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 wy54224 at 2011-01-25 17:02:29 on Problem 3980
program poj3980;
var s,s1,s2:string;
    c:char;
    i,code:integer;
    a1,a2,a3:longint;
begin
 readln(s);
 while s<>'' do
 begin
  i:=1;
  c:=s[i];
  while c<>' 'do
  begin
   inc(i);
   c:=s[i];
  end;
  s1:=copy(s,1,i-1);
  delete(s,1,i);
  s2:=s;
  val(s1,a1,code);
  val(s2,a2,code);
  a3:=a1 mod a2;
  writeln(a3);
  readln(s);
 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