#P1035. [NOIP 2002 普及组] 级数求和

[NOIP 2002 普及组] 级数求和

Description

Given: Sn=1+12+13++1nS_n= 1+\dfrac{1}{2}+\dfrac{1}{3}+…+\dfrac{1}{n}. It is obvious that for any integer kk, when nn is sufficiently large, Sn>kS_n>k. Given an integer kk, compute the smallest nn such that Sn>kS_n>k.

Input Format

A positive integer kk.

Output Format

A positive integer nn.

1

2

Hint

【Constraints】 For 100%100\% of the testdata, 1k151\le k \le 15.

【Source】 NOIP 2002 Junior, Problem 1.

Translated by ChatGPT 5