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 bleach35 at 2012-05-07 20:34:09 on Problem 2316
program  poj2316;
var i,j,k,n,m,tot:longint;
    ss:string;
    ans:array [1..20] of int64;

begin
  //assign(input,'a.in');reset(input);
  readln(ss);
  for i:=1 to length(ss) do
    Val(ss[i],ans[i]);
  while not eof do
    begin
      readln(ss);
      for i:=1 to length(ss) do
        ans[i]:=ans[i]+ord(ss[i])-48;
    end;
  for i:=1 to length(ss) do
    write(ans[i] mod 10);
  writeln;
  //close(input);
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