Logo
(追記) (追記ここまで)

16006번 - Harmonic number 서브태스크다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 512 MB1401007777.000%

문제

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.

제한

  • 2 ≤ N ≤ 10000

서브태스크

번호배점제한
133

2 ≤ N ≤ 36

230

37 ≤ N ≤ 1512

318

1513 ≤ N ≤ 4003

419

4004 ≤ N ≤ 10000

예제 입력 1

6

예제 출력 1

49
20

예제 입력 2

20

예제 출력 2

55835135
15519504

예제 입력 3

47

예제 출력 3

280682601097106968469
63245806209101973600

힌트

출처

Olympiad > Balkan Olympiad in Informatics > Junior Balkan Olympiad in Informatics > JBOI 2018 2번

채점 및 기타 정보

  • 예제는 채점하지 않는다.
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /