|
|
вернуться в форумHow can i do faster? I submitted several times but got TL#4. Where is my fault? var r,p,m,n,i:longint; kod:integer; j:shortint; q,s,t:string[10]; st:array [1..1000000] of string[50]; begin readln(n); str(n,q); r:=1; for i:=1 to length(q)-1 do r:=r*10; i:=n-r; repeat inc(i); str(i,s); j:=0; repeat inc(j); t:=s; delete(t,j,1); val(t,m,kod); if m+i=n then begin inc(p); st[p]:=s+' '+'+'+' '+t+' '+'='+' '+q; break; end; until j=length(s); until i=n; writeln(p); for i:=1 to p do writeln(st[i]); end. What's the min value of the first number. I mean it's min value according to N Edited by author 22.11.2007 14:40 Re: How can i do faster? Simple Problem. Just solve it. Go from last digits to first. |
|
|