What's up here? What i do not notice, i wonder! {$A+,B-,D+,E-,F-,G-,I+,L+,N+,O-,P-,Q+,R+,S+,T-,V+,X+,Y+} Var n,i:longint; s:string; BEGIN readln(n); if n=0 then begin writeln(0); exit; end; if n=1 then begin writeln(1); exit; end; s:=''; for i:=9 downto 2 do while (n mod i)=0 do begin s:=chr(ord('0')+i)+s; n:=n div i; end; if n<>1 then writeln(-1) else writeln(s); END. Re: What's up here? What i do not notice, i wonder! > if n=0 then begin writeln(0); exit; end; Look, i will be swearing now. What's that? Yeah, "This problem sure contains some traps", but i would hardly call them "good"! So, do you consider natural (i.e. positive integer) numbers to start from 1,2, and so on? Ok, so did i, before coming to this place (surely very very good place). But then, i lost many submitions, being not able to imagine, that in that task "positive integer" means 0,1,2,... And here it is again... As i can guess, here you consider positive integers start from 1,2, and so on. Came to any common solution? Please, if you make such traps (i know, that is necessary), make them good real traps, for people to be out of word, being catched. Yours, Greg |