Var d,m,i,all:integer; begin read(d,m); all:=0; for i:=12 downto (m+1) do begin if i=12 then all:=all+31; if i=11 then all:=all+30; if i=10 then all:=all+31; if i=9 then all:=all+30; if i=8 then all:=all+31; if i=7 then all:=all+31; if i=6 then all:=all+30; if i=5 then all:=all+31; if i=4 then all:=all+30; if i=3 then all:=all+31; if i=2 then all:=all+28; if i=1 then all:=all+31; end; if i=12 then all:=all+31-d; if i=11 then all:=all+30-d; if i=10 then all:=all+31-d; if i=9 then all:=all+30-d; if i=8 then all:=all+31-d; if i=7 then all:=all+31-d; if i=6 then all:=all+30-d; if i=5 then all:=all+31-d; if i=4 then all:=all+30-d; if i=3 then all:=all+31-d; if i=2 then all:=all+28-d; if i=1 then all:=all+31-d; writeln(all); end.
begin for i1 := 0 to 9 do for i2 := 0 to 9 do for i3 := 0 to 9 do for i4 := 0 to 9 do for i5 := 0 to 9 do for i6 := 0 to 9 do if i1 + i2 + i3 = i4 + i5 + i6 then begin Writeln(i1, i2, i3, i4, i5, i6); k := k + 1; end; writeln(k); end.
var money: array[1..7]of integer; count: array[1..7]of integer; s, i: integer;
11 | 4
8 |
| 2
3
0,| 125 *4
0 | 5 *4
2 | 0
15, 75= 33,3
15 |4
12 |
--- | 3
3
0, |75 *4
3 |0
22,6875 =112,23
22 | 4
20 |
--- | 5 | 4
2 4 |--
-- | 1
1
0,| 6875 *4
2 | 75 *4
3 | 0
30,375 =132,12
30 | 4
28 |
--- | 7 | 4
2 4 |--
--- | 1
3
0, | 375 *4
1 | 5
2 |0