SHARE
TWEET

Untitled

Dainoom Oct 14th, 2019 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var x:array[0..1000000] of byte;
  2.      n:integer;
  3.  
  4.  
  5. procedure f; // создаем функцию для постоянного использования, как раба
  6. var i,papich,ban:integer;
  7. begin
  8.  papich:=0;
  9.  for i:=1 to n do
  10.   begin
  11.    ban:=x[i]*2+papich; // деление столбиком
  12.    x[i]:=ban mod 10;
  13.    papich:=ban div 10;
  14.   end;
  15.  if papich>0 then
  16.   begin
  17.    n:=n + 1;
  18.    x[n]:=papich;
  19.   end;
  20. end;
  21.  
  22. var a,i:integer; // тело программы
  23. begin
  24.  readln(a);
  25.  n:=1;
  26.  x[1]:=1;
  27.  for i:=1 to a do
  28.   f;
  29.  for i:=n downto 1 do
  30.   write(x[i]);
  31.  writeln;
  32. end.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top