| ||||||||||
| 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题解做贡献var t,a,b:longint;
function ud(x:longint):longint;
var i,p,q,k:longint;
begin
i:=0;p:=x;q:=0;
while p>0 do begin
inc(i);
k:=p;
p:=p div 10;
q:=q*10+k-p*10;
end;
exit(q);
end;
begin
readln(t);
while t>0 do begin
dec(t);
readln(a,b);
writeln(ud(ud(a)+ud(b)));
end;
end.
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator