| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
为什么超时?不可理解~~program fa;
var
n,i,j,k:integer;
ch:char;
begin
read(ch);
while ch<>'0' do
begin
n:=0;
while ch<>#13 do
begin
if (ch>='0') and (ch<='9') then n:=n+ord(ch)-48;
read(ch);
end;
read(ch);
writeln((n-1) mod 9+1);
read(ch);
end;
end.
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator