program greate_graph; {$APPTYPE CONSOLE} uses SysUtils; var f:text; i,j:integer; b:boolean; begin readln(n); assign(f1,'graph.dat'); RewriteF1); writeln(f,n); for CLOse(f1); WHILE s1<>s2 do begin b:=false; if length(s1)>length(s2) then b:=true; if length(s1)=length(s2) then begin i:=1; while (s1[i]=s2[i])and (is2[i] then b:=true; end; if (b) then begin ost:=0; for i:=1 to length(s1) do begin temp:=((ord(s1[i])-48)+ost*10) div 2; ost:=((ord(s1[i])-48)+ost*10) mod 2; s1[i]:=chr(temp+48); end; if s1[1]='0' then delete(s1,1,1); end else begin ost:=0; for i:=1 to length(s2) do begin temp:=((ord(s2[i])-48)+ost*10) div 2; ost:=((ord(s2[i])-48)+ost*10) mod 2; s2[i]:=chr(temp+48); end; if s2[1]='0' then delete(s2,1,1); end; end; assign(f2,'evo.sol'); rewrite(f2); writeln(f2,S1); Close(f2); { TODO -oUser -cConsole Main : Insert code here } end.