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 1243. Divorce of the Seven Dwarfs

I got AC,here is my program
Posted by ufx 9 Apr 2003 13:09
//I didn't use an array
program ex;
var  ch:char;
     a:longint;
begin
    read(ch);
    a:=0;
    while (ch in ['0'..'9']) do begin
        a:=(a*10+(ord(ch)-48)) mod 7;
        read(ch);
    end;
    writeln(a);
end.
Re: I got AC,here is my program
Posted by Saber 9 Apr 2003 14:59
Please don send ur AC code for every user...
thanx
SABER
Re: I got AC,here is my program
Posted by Serega 29 May 2003 16:45
> //I didn't use an array
> program ex;
> var  ch:char;
>      a:longint;
> begin
>     read(ch);
>     a:=0;
>     while (ch in ['0'..'9']) do begin
>         a:=(a*10+(ord(ch)-48)) mod 7;
>         read(ch);
>     end;
>     writeln(a);
> end.