2010-2011

Монеты                                                                                          (10 Баллов)

Решение

label 1;
var i,j,a,b,c:longint;
begin
read(a);
for i:=0 to a div 3 do
for j:=0 to a div 5 do
if i*3+j*5=a then begin writeln(i);writeln(j);c:=1;goto 1;end;
1:
if c=0 then write('NO');
end.