Const n=550;
var k10,k50:integer;
begin
writeln(' 10 50');
writeln('----------');
for k10:=0 to n div 10 do
begin
k50:=(n-10*k10) div 50;
if 10*k10+50*k50 = n then writeln(k10:4,k50:5);
end;
end.
Результат:
10 50
----------
0 11
5 10
10 9
15 8
20 7
25 6
30 5
35 4
40 3
45 2
50 1
55 0