|
|
вернуться в форумWhy I got WA?? var a:array[1..100]of longint;x:char;total,j,k,max:longint; begin FILLCHAR(a,sizeof(a),0); K:=0;max:=0; while not(EOF) do begin read(x);INC(K); if x in ['0'..'9'] then a[K]:=ord(x)-48; if x in ['A'..'Z'] THEN a[K]:=ord(x)-55; if not(x in ['A'..'Z','0'..'9',#13,#10]) THEN BEGIN WRITELN('No solution.');halt;end; IF a[k]>max then max:=a[k];end; if max<=1 then begin writeln('2');halt;end; max:=max+1; repeat total:=0; for j:=1 to k do total:=total*max+a[j]; if total mod (max-1)=0 then begin writeln(max);halt;end; inc(max); until MAX>36; writeln('No solution.'); end. Re: Why I got WA?? Послано a 6 июн 2004 19:29 Which text? Re: Why I got WA?? Послано ACer 7 июн 2004 20:35 Hi!do you know who i am Re: Why I got WA?? Can ypu send a message to me what the text sey |
|
|