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

7112번 - Cutting Out of Factorials 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB3312853.333%

문제

A factorial of a positive integer n (which is noted as n!) is multiplication of all integers from 1 till n: n!=1×2×3×...×n. What is the least number of factorials to be cut out of multiplication of the first k factorials 1!×2!×3!×...×k! so that the multiplication of remaining factorials will be the square of a some integer ?

입력

From the keyboard the value of k (2 ≤ k ≤ 500) is input.

출력

You must output in the increasing order the values of the numbers whose factorials have to be be cut out. If there are several solutions, you must output just one of them.

제한

예제 입력 1

4

예제 출력 1

2

예제 입력 2

6

예제 출력 2

2 3

힌트

출처

Olympiad > Latvian olympiad in informatics > 10th Latvian olympiad in informatics > Stage III (Country) 4번

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

출처

대학교 대회

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

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