| ||||||||||
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 |
What happened with my program of 1528program poj1528; var n,i,sum:longint; a:array[1..201,1..2] of longint; function add(a:longint):longint; var i,s:longint; begin s:=1; for i:=2 to a-1 do if (a mod i=0) then s:=s+i; add:=s; end; begin n:=10000; sum:=0; while n<>0 do begin read(n); inc(sum); a[sum,1]:=n; a[sum,2]:=add(n); end; writeln('PERFECTION OUTPUT'); for i:=1 to sum-1 do begin write(a[i,1]:5,' '); if a[i,2]<a[i,1] then writeln('DEFICIENT'); if a[i,2]=a[i,1] then writeln('PERFECT'); if a[i,2]>a[i,1] then writeln('ABUNDANT'); end; writeln('END OF OUTPUT'); end. {why it always say 'Worry Answer'} Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator