Cod sursa(job #171552)

Utilizator ghitza_2000Stefan Gheorghe ghitza_2000 Data 4 aprilie 2008 15:40:59
Problema Sum Scor 0
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.72 kb
{****************}
{** Hai STEAUA **}
{****************}
{ghitza2008}
var i,n,x:longint;
    s1:int64;

    f,g:text;
procedure ghitza;
var z:int64;
begin
z:=x*2;
writeln(g,((z*(z+1))div 2)-s1);
end;
procedure Stefy ;
var j,h:longint;
    a:array[1..600000] of byte;
begin
readln(f,x);
fillchar(a,2*x,0);
{for j:=1 to 2*x do
 a[j]:=0;}
s1:=0;
j:=2;
while j<=x do
begin
if x mod j=0 then
                     s1:=s1+j+(x+j);
inc(j);
end;
ghitza;
end;

procedure sunt_cel_mai_tare;
begin
     assign(f,'sum.in');reset(f);
     readln(f,n);
     assign(g,'sum.out'); rewrite(g);
     for i:=1 to n do
     begin
       Stefy;

     end;
end;
begin

sunt_cel_mai_tare;
close(f); close(g);
end.