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 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.
Please don send ur AC code for every user...
thanx
SABER
> //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.