Search found 2 matches

by Marcin
Sat Jul 05, 2003 10:27 pm
Forum: Volume 3 (300-399)
Topic: 382 - Perfection
Replies: 95
Views: 35373

Thanks Hank.
I changed it and got AC :D
by Marcin
Sat Jul 05, 2003 12:56 am
Forum: Volume 3 (300-399)
Topic: 382 - Perfection
Replies: 95
Views: 35373

382-Perfection -why WA? Pascal

Please tell me what's wrong with my code:
[pascal]program Perfection;
var
a,i:longint;
s:longint;
begin
writeln('PERFECTION OUTPUT');
read(a);
while a<>0 do begin s:=0;
if a=1 then writeln(' 1 PERFECT') else begin
for i:=1 to ((a mod 2) + (a div 2)) do begin
if a mod i = 0 then s:=s+i;
if ...

Go to advanced search