Вспомни общие закономерности набора символов. нажатие кнопки английская раскладка нажатие кнопки + Shift русская раскладка 1) В каком ряду кнопки нужный символ? Верхний. Нижний 2) В каком столбце кнопки нужный символ" Левый Правый
Var A,B0,B1,B2,B3,B4,B5,B6,B7,B8,B9:integer; Begin WriteLn('Введите число'); ReadLn(A); While A>0 do Begin Case A mod 10 of 0:B0:=B0+1; 1:B1:=B1+1; 2:B2:=B2+1; 3:B3:=B3+1; 4:B4:=B4+1; 5:B5:=B5+1; 6:B6:=B6+1; 7:B7:=B7+1; 8:B8:=B8+1; 9:B9:=B9+1; End; A:= A div 10; End; if (B0 = 3)and(B1<2)and(B2<2)and(B3<2)and(B4<2)and(B5<2)and(B6<2)and(B7<2)and(B8<2)and(B9<2)then WriteLn('Верно') else if (B1 = 3)and(B2<2)and(B3<2)and(B4<2)and(B5<2)and(B6<2)and(B7<2)and(B8<2)and(B9<2)and(B0<2)then WriteLn('Верно') else if (B2 = 3)and(B3<2)and(B4<2)and(B5<2)and(B6<2)and(B7<2)and(B8<2)and(B9<2)and(B0<2)and(B1<2)then WriteLn('Верно') else if (B3 = 3)and(B4<2)and(B5<2)and(B6<2)and(B7<2)and(B8<2)and(B9<2)and(B0<2)and(B1<2)and(B2<2)then WriteLn('Верно') else if (B4 = 3)and(B5<2)and(B6<2)and(B7<2)and(B8<2)and(B9<2)and(B0<2)and(B1<2)and(B2<2)and(B3<2)then WriteLn('Верно') else if (B5 = 3)and(B6<2)and(B7<2)and(B8<2)and(B9<2)and(B0<2)and(B1<2)and(B2<2)and(B3<2)and(B4<2)then WriteLn('Верно') else if (B6 = 3)and(B7<2)and(B8<2)and(B9<2)and(B0<2)and(B1<2)and(B2<2)and(B3<2)and(B4<2)and(B5<2)then WriteLn('Верно') else if (B7 = 3)and(B8<2)and(B9<2)and(B0<2)and(B1<2)and(B2<2)and(B3<2)and(B4<2)and(B5<2)and(B6<2)then WriteLn('Верно') else if (B8 = 3)and(B9<2)and(B0<2)and(B1<2)and(B2<2)and(B3<2)and(B4<2)and(B5<2)and(B6<2)and(B7<2)then WriteLn('Верно') else if (B9 = 3)and(B0<2)and(B1<2)and(B2<2)and(B3<2)and(B4<2)and(B5<2)and(B6<2)and(B7<2)and(B8<2)then WriteLn('Верно') else WriteLn('Не верно') End.
A,B0,B1,B2,B3,B4,B5,B6,B7,B8,B9:integer;
Begin
WriteLn('Введите число');
ReadLn(A);
While A>0 do
Begin
Case A mod 10 of
0:B0:=B0+1;
1:B1:=B1+1;
2:B2:=B2+1;
3:B3:=B3+1;
4:B4:=B4+1;
5:B5:=B5+1;
6:B6:=B6+1;
7:B7:=B7+1;
8:B8:=B8+1;
9:B9:=B9+1;
End;
A:= A div 10;
End;
if (B0 = 3)and(B1<2)and(B2<2)and(B3<2)and(B4<2)and(B5<2)and(B6<2)and(B7<2)and(B8<2)and(B9<2)then WriteLn('Верно')
else if (B1 = 3)and(B2<2)and(B3<2)and(B4<2)and(B5<2)and(B6<2)and(B7<2)and(B8<2)and(B9<2)and(B0<2)then WriteLn('Верно')
else if (B2 = 3)and(B3<2)and(B4<2)and(B5<2)and(B6<2)and(B7<2)and(B8<2)and(B9<2)and(B0<2)and(B1<2)then WriteLn('Верно')
else if (B3 = 3)and(B4<2)and(B5<2)and(B6<2)and(B7<2)and(B8<2)and(B9<2)and(B0<2)and(B1<2)and(B2<2)then WriteLn('Верно')
else if (B4 = 3)and(B5<2)and(B6<2)and(B7<2)and(B8<2)and(B9<2)and(B0<2)and(B1<2)and(B2<2)and(B3<2)then WriteLn('Верно')
else if (B5 = 3)and(B6<2)and(B7<2)and(B8<2)and(B9<2)and(B0<2)and(B1<2)and(B2<2)and(B3<2)and(B4<2)then WriteLn('Верно')
else if (B6 = 3)and(B7<2)and(B8<2)and(B9<2)and(B0<2)and(B1<2)and(B2<2)and(B3<2)and(B4<2)and(B5<2)then WriteLn('Верно')
else if (B7 = 3)and(B8<2)and(B9<2)and(B0<2)and(B1<2)and(B2<2)and(B3<2)and(B4<2)and(B5<2)and(B6<2)then WriteLn('Верно')
else if (B8 = 3)and(B9<2)and(B0<2)and(B1<2)and(B2<2)and(B3<2)and(B4<2)and(B5<2)and(B6<2)and(B7<2)then WriteLn('Верно')
else if (B9 = 3)and(B0<2)and(B1<2)and(B2<2)and(B3<2)and(B4<2)and(B5<2)and(B6<2)and(B7<2)and(B8<2)then WriteLn('Верно')
else WriteLn('Не верно')
End.
#include <iostream>
int main() {
int arr[100], n, first = 0, second = 0;
std::cin >> n;
for (int i = 0; i < n; ++i)
std::cin >> arr[i];
for (int i = 1; i < n; ++i) {
const int diff = arr[i] - arr[i - 1];
if (diff > 0)
if (arr[i] <= 2000)
first += diff;
else if (arr[i - 1] >= 2000)
second += diff;
else {
first += 2000 - arr[i - 1];
second += arr[i] - 2000;
}
}
std::cout << first << ' ' << second;
return 0;
Объяснение:
язык python