|
|
back to boardI am getting output limit exceeded. Can you help me? here is my program I am getting output limit exceeded. Can you help me? here is my program: var a,b,c,d,i,k,j:integer; p:boolean; s:array[1..1000] of integer; begin readln(i); for a:=1 to i do readln(s[a]); for k:=1 to i do begin if k<>1 then writeln(' '); write(0,' ',1); p:=false; if s[k] mod 2=0 then begin a:=2; b:=trunc(s[k]/2); p:=true; end; d:=3; while p=false do if (s[i] mod d)=0 then begin a:=d; b:=trunc(s[k]/d); p:=true; end else d:=d+2; c:=a; while c+1<s[i] do begin if (c-1) mod b=0 then write(' ',c); if (c+1) mod b=0 then write(' ',c+1); c:=c+a; end; end; end. |
|
|