|
|
вернуться в форумWhy I got WA????? Help!!!!!! Послано shent 15 мар 2002 09:32 This is my program, I need Help. Thank u very much indeed!!! var s:longint; t:char; a,p:byte; begin a:=2;s:=0; read(t); while ord(t)<>13 do begin if t in ['0'..'9'] then p:=ord(t)-48 else p:=ord(t)-55; s:=s+p; if p+1>a then a:=p+1; read(t); end; for a:=a to 37 do if s mod (a-1) = 0 then break; if (a=37)or(s=0) then writeln('No solution.') else writeln(a); end. Re: Why I got WA????? Help!!!!!! Послано WAZZAP 26 мар 2002 14:13 correct answer on input 0 is 2, not 'No solution.' |
|
|