#T722. 【NOIP2002-J1】级数求和

    ID: 1303 Type: Default 1000ms 128MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>函数模拟算法CSP普及组递归算法循环语句

【NOIP2002-J1】级数求和

Description

Given: Sn = 1 + 1/2 + 1/3 + … + 1/n. Clearly, for any integer K, when n is sufficiently large, Sn will be greater than K.

Now given an integer K (1 ≤ K ≤ 15), compute the smallest n such that Sn > K.

Input Format

A positive integer K.

Output Format

A positive integer n.

```input1 1 ``` ```output1 2 ``` ## Hint

【Data Range】

For 100% of the data, 1 ≤ k ≤ 15.

Source

NOIP2002-J1