시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 512 MB | 77 | 53 | 36 | 78.261% |
Consider a natural number N and the expression HN = 1 + 1/2 + 1/3 + ... + 1/N
Determine the natural numbers, the numerator P and the denominator Q of the irreducible fraction HN = P/Q.
The standard input contains on the first line the number N.
The standard output will contain on the first line the number P and on the second line the number Q.
번호 | 배점 | 제한 |
---|---|---|
1 | 33 | 2 ≤ N ≤ 36 |
2 | 30 | 37 ≤ N ≤ 1512 |
3 | 18 | 1513 ≤ N ≤ 4003 |
4 | 19 | 4004 ≤ N ≤ 10000 |
6
49 20
20
55835135 15519504
47
280682601097106968469 63245806209101973600