ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1104. Don’t Ask Woman about Her Age

Why I got WA??
Posted by ural_ChenGuoPeng 14 May 2003 10:35
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??
Posted by a 6 Jun 2004 19:29
Which text?
Re: Why I got WA??
Posted by ACer 7 Jun 2004 20:35
Hi!do you know who i am
Re: Why I got WA??
Posted by AOTL_EKREM 21 Jan 2006 23:07
Can ypu send a message to me what the text sey