import java.util.Scanner;
public class Main
{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print("Введите число: \nА = ");
int x, y = sc.nextInt();
sc.close();
x = y * y;
System.out.println("A^2 = " + x);
y *= x;
System.out.println("A^3 = " + y);
x *= y;
System.out.println("A^5 = " + x);
y = x * x;
System.out.println("A^10 = " + y);
y *= x;
System.out.println("A^15 = " + y);
}
}
Разбиваем по 4 цифры справа налево: 1 0110 1010 и каждую тетраду заменяем её шестнадцатиричным представлением: 16А
Ответ №1.
Program code;
Var s: string;
begin
write('Введите код: ');
read(s);
if s='2145'
then write('molotok') else writeln('no');
end.
Пример:
Введите код: 2145
molotok