Pagini recente » Diferente pentru problema/tir intre reviziile 21 si 13 | Atasamentele paginii . | Diferente pentru problema/hoata2 intre reviziile 93 si 26 | Atasamentele paginii Profil cyana13 | Cod sursa (job #173192)
Cod sursa(job #173192)
var
f:text;
a1,b1,a2,b2,a3,b3,s,st,i,j,y,k:longint;
begin
assign(f,'plus.in');reset(f);
read(f,s);
read(f,b1,a1);read(f,b2,a2); read(f,b3,a3);
close(f);
assign(f,'plus.out');rewrite(f);
k:=0;
for i:=0 to b1 do
for j:=0 to b2 do
begin
st:=a1*i+a2*j;
for y:=0 to b3 do
if st+y*a3=s then k:=k+1;
end;
write(f,k);
close(f); end.