시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 23 9 8 66.667%

문제

알렉산드리아의 디오판토스는 알렉산드리아에 살던 이집트 수학자이다. 그는 정수로된 해 만을 가지는 다항 방정을 처음으로 연구한 수학자이다. 그를 기리기 위해서 후대에 이 방정식은 디오판토스 방정식이라고 이름이 붙었다. 

가장 유명한 디오판토스 방정식은 \(x^n + y^n = z^n\)이다. 페르마는 \(n\) > 2인 경우에 정수해가 존재하지 않는다고 추론했고, 앤드루 와일스가 증명했다. 

다음과 같은 디오판토스 방정식이 있다.

\(\frac{1}{x} + \frac{1}{y} = \frac{1}{n}\) where \(x,y,n \in \mathbb{N}^+\)

\(n\)이 주어졌을 때, 이 방정식의 해는 총 몇 개일까? (\(x\) ≤ \(y\)) \(n\) = 4인 경우에 아래와 같이 총 3가지 해가 존재한다.

\(\frac{1}{5} + \frac{1}{20} = \frac{1}{4}\) \(\frac{1}{6} + \frac{1}{12} = \frac{1}{4}\) \(\frac{1}{8} + \frac{1}{8} = \frac{1}{4}\)

입력

첫째 줄에 테스트 케이스의 개수가 주어진다. 각 테스트 케이스는 한 줄로 이루어져 있으며, \(n\)이 주어진다. (1 ≤ \(n\) ≤ 109)

출력

각각의 테스트 케이스마다 "Scenario #i:"를 출력하고, 주어진 n에 대한 방정식의 해의 개수를 출력한다. 각 테스트 케이스 사이에는 빈 줄을 출력한다.

예제 입력 1

2
4
1260

예제 출력 1

Scenario #1:
3

Scenario #2:
113
W3sicHJvYmxlbV9pZCI6Ijc1MTYiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWM1NGNcdWI4MDlcdWMwYjBcdWI0ZGNcdWI5YWNcdWM1NDRcdWM3NTggXHViNTE0XHVjNjI0XHVkMzEwXHVkMWEwXHVjMmE0IiwiZGVzY3JpcHRpb24iOiI8cD5cdWM1NGNcdWI4MDlcdWMwYjBcdWI0ZGNcdWI5YWNcdWM1NDRcdWM3NTggXHViNTE0XHVjNjI0XHVkM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