1) ((N mod 3=0) or (N mod 7=0)) and (N mod 5<>0)
2) (((N mod 100) div 10)>((N mod 1000) div 100)) and (N mod 3=0)
3) (N mod 2=0) or ((N >400) and (N<500))
4) (N mod 6=0) and (N mod 7<>0)
5) ((N>9) and (N<100)) and ((N mod 10=6) or (N div 10=6) ))div 10))
6) (N mod 2=0) and (N mod 3=0)
7) ((N>99) and (N<1000)) and (N mod 2<>0)
8) ((N>9) and (N<100)) and ((N div 10) mod 2=0)
9) ((N<=77) or (N>=88))
10) (N mod 2<>0) or (N <=3) or (N mod 7<>0)
11) ((a>9) and (a<100)) and (b>0)
12) (a mod b=0) or (b mod a=0)
13) (((a mod 100) div 10) mod 2=0) and (((a mod 100) div 10) mod 2=0)
14) (a*b) mod 3=0
15) ((a+b) mod 2=0) and ((a*b) mod 2<>0)
16) ((a>9) and (a<100)) and (b<53)
17) ((a mod 1000) div 100=2) or ((b mod 1000) div 100=2)
18) (a>0) or (b>0)
19) (a mod 10)>((a mod 100) div 10)
20) (a>0) and (b>0)
Program DetkaKonfetka;
uses Drawman;
begin
Field(14,8);
ToPoint (1,1);
PenDown;
OnVector(1,4);
OnVector(4,4);
OnVector(4,1);
OnVector(1,1);
PenUp;
ToPoint (3,3);
PenDown;
OnVector(3,6);
OnVector(6,6);
OnVector(6,3);
OnVector(3,3);
PenUp;
ToPoint (5,5);
PenDown;
OnVector(5,8);
OnVector(8,8);
OnVector(8,5);
OnVector(5,5);
PenUp;
ToPoint (7,6);
PenDown;
OnVector(6,10);
OnVector(10,3);
OnVector(7,3);
OnVector(7,6);
PenUp;
ToPoint (9,4);
PenDown;
OnVector(12,4);
OnVector(12,1);
OnVector(9,1);
OnVector(9,4);
PenDown;
ToPoint(0,0);
End.
ответ: 64+32+16+8+1+1
вот такое вот решение на python
n = 122
s = ''
while n > 0:
counter = 0
for i in range(1, 10):
if 2**i < n:
counter += 1
else:
s = s + str(2**counter)
n = n - 2**counter
break
s = s + ' '
s = s[:-1]
s = s.replace(' ', '+')
print(s)