数学题: { Author:wzx961008 Problem:UVa 11934-Magic Formula Verdict:Accepted Language:PASCAL Run Time:0.004s Submission Date:2011-03-23 16:36:15 } var a,b,c,d,L,i,tot:longint; function f(x:integer):longint; begin exit(a*x*x+b*x+c); end; begin while true do begin readln(a,b,c,d,L); if (a=0)and(b=0)and(c=0)and(d=0)and(L=0) then break; tot:=0; for i:=0 to L do if f(i) mod d=0 then inc(tot); writeln(tot); end; end.