|
|
back to boardnow,the online judge system doesn't work...ft...i don't know whether my solution right or not... var s:string; i,j:byte; begin readln(s);j:=0; for i:=1 to length(s) do if (s[i]>='0')and(s[i]<='9') then j:=(j+ord(s[i])-ord('0'))mod 3; if j=0 then writeln(2) else begin writeln(1);writeln(j) end; end. Re: now,the online judge system doesn't work...ft...i don't know whether my solution right or not... Posted by Dilyan 14 Jul 2004 15:43 yes, i think this solution i right |
|
|