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

Pascal的请进.

Posted by minmax at 2011-08-09 19:58:38 on Problem 1470 and last updated at 2011-08-09 20:00:08
function getnum:longint;
var   c:char;
      x:longint=0;
begin
      read(c);
      while not (c in num) do read(c);
      while c in num do
      begin
            x:=x*10+ord(c)-48;
            read(c);
      end;
      exit(x);
end;

用上面的函数代替read.每次读入一个数.
num:set of char=['0'..'9'];

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