Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
超级暴力(Pascal)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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator