P1035 [NOIP 2002 Junior] Series Summation
Description
Given: $S_n= 1+\dfrac{1}{2}+\dfrac{1}{3}+…+\dfrac{1}{n}$. It is obvious that for any integer $k$, when $n$ is sufficiently large, $S_n>k$.
Given an integer $k$, compute the smallest $n$ such that $S_n>k$.
Input Format
A positive integer $k$.
Output Format
A positive integer $n$.
Explanation/Hint
【Constraints】
For $100\%$ of the testdata, $1\le k \le 15$.
【Source】
NOIP 2002 Junior, Problem 1.
Translated by ChatGPT 5