Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

为什么超时?不可理解~~

Posted by richardhuang at 2004-05-07 13:37:54 on Problem 1519
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator