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????? Help!!!!!!
Posted by shent 15 Mar 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!!!!!!
Posted by WAZZAP 26 Mar 2002 14:13
correct answer on input 0 is 2, not 'No solution.'