var
e0, s: real;
k: integer;
a: array [0..10000] of real;
begin
readln(e0);
k := 0;
a[0] := 1;
repeat
a[k + 1] := power(((k + 2) / ((k + 1) * k)), k);
s := a[k] + a[k + 1];
inc(k);
until (a[k] <= e0);
writeln(s:0:3);
end.
Copyright © 2025 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
var
e0, s: real;
k: integer;
a: array [0..10000] of real;
begin
readln(e0);
k := 0;
a[0] := 1;
repeat
a[k + 1] := power(((k + 2) / ((k + 1) * k)), k);
s := a[k] + a[k + 1];
inc(k);
until (a[k] <= e0);
writeln(s:0:3);
end.