Pagini recente » Cod sursa (job #2920898) | Cod sursa (job #181141) | Cod sursa (job #2387289) | Cod sursa (job #1701261) | Cod sursa (job #567366)
Cod sursa(job #567366)
var f,g:text;
k,i,j,n,s:longint;
begin
assign(f,'fractii.in');reset(f);
assign(g,'fractii.out');rewrite(g);
while not eof(f) do begin
readln(f,n);
k:=0;
for i:=1 to n do
for j:=1 to n do begin
if (i=1) or (j=1) then k:=k+1;
if (i<>1) and(j<>1) then begin
s:=i+j;
if s mod 2<>0 then k:=k+1;
end;
end;
writeln(g,k);
end;
close(f);
close(g);
end.