Câu trả lời:
program Phantichso;
var N, i, m, a:Longint;
dem: Integer;
Begin
write('Nhap N: ');
readln(N);
dem:=0;
for i:= 1 to N div 2 do
if (2*N-i*(i+1)) mod (2*(i+1)) = 0 then
Begin
a:= (2*N-i*(i+1)) div (2*(i+1));
inc(dem);
if (a>0) then
Begin
writeln('Cach thu ', dem);
for m:=a to a+i-1 do
write(m, '+');
writeln(m+1);
End;
End;
End.