Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var m, n: longint;
- var sum: real;
- begin
- readln(m);
- sum := 0;
- n := 0;
- while (sum < m) do begin // Пока общая сумма меньше данного числа..
- n := n + 1;
- sum := sum + 1/n;
- end;
- writeln(n);
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement