#T387. 级数求和

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

级数求和

Description

Given: S~n~ = 1 + 1/2 + 1/3 + … + 1/n. It is clear that for any integer K, when n is sufficiently large, S~n~ will exceed K.
Now, given an integer K (1 ≤ K ≤ 15), compute the smallest n such that S~n~ > K.

Input Format

A positive integer K.

Output Format

A positive integer n.

1
2

Hint

【Data Range】
For 100% of the data, 1 ≤ k ≤ 15.

Source

NOIP2002-J1