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

19495번 - Square Function 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 256 MB359825.806%

문제

Let us define function $S$: $\mathbb{N} \rightarrow \mathbb{N}$ in the following way: $S(x)$ is the minimum number for which there exists an increasing sequence of integers $x = t_{1} < t_{2} < \ldots < t_{k} = S(x)$ such that $t_{1} \cdot t_{2} \cdot \ldots \cdot t_{k}$ is a square of some integer. For example, $S(2) = 6,ドル $S(3) = 8,ドル $S(4) = 4$.

Given $y,ドル find all such $x$ that $S(x)=y$.

입력

The only line of input contains a single integer $y$ (1ドル \le y \le 10^{6}$).

출력

On the first line, print the number of solutions. On the second line, list all solutions in increasing order separated by spaces.

제한

예제 입력 1

4

예제 출력 1

1
4

예제 입력 2

5

예제 출력 2

0

예제 입력 3

6

예제 출력 3

1
2

힌트

$\mathbb{N}$ is the set of positive integers.

출처

Camp > Petrozavodsk Programming Camp > Summer 2016 > Day 7: Ural FU Dandelion Contest A번

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

출처

대학교 대회

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

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