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 zyx980506 at 2010-04-05 22:21:25 on Problem 2105
var n,i,j,k,x,y,z,s:longint;
    ch:char;
begin
  readln(n);
  for i:=1 to n do begin
    for j:=1 to 4 do begin
      s:=0;k:=128;
      for x:=1 to 8 do begin
        read(ch);s:=s+k*(ord(ch)-48);
        k:=k div 2;
      end;
      write(s);
      if j<>4 then write('.');
    end;
    readln;
    writeln;
  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