Advertisement
Laster_Alex

Z4-NO1

Feb 17th, 2022
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.28 KB | None | 0 0
  1. var m, n: longint;
  2. var sum: real;
  3. begin
  4.     readln(m);
  5.     sum := 0;
  6.     n := 0;
  7.    
  8.     while (sum < m) do begin  // Пока общая сумма меньше данного числа..
  9.         n := n + 1;
  10.         sum := sum + 1/n;
  11.     end;
  12.    
  13.     writeln(n);
  14. end.
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement