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

31100번 - Diophantine Equation 스페셜 저지다국어

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

문제

Bikarp has a square of a positive integer $n^2$. He wants to split it into a sum of two cubes of positive integers. In other words, Bikarp wants to solve the following Diophantine equation

$$n^2 = x^3 + y^3$$

in positive integers, where $n$ is fixed.

Find a solution of this equation or determine that it doesn't exist.

입력

The first line contains integer $T$ --- the number of test samples (1ドル \le T \le 3000$).

The $i$-th of the following $T$ lines contains a single integer $n$ (1ドル \le n \le 10^9$).

출력

Output $T$ lines. The $i$-th of them should contain the answer for the $i$-th test sample: either "impossible", if $n$ cannot be decomposed, or two positive integers $x$ and $y$.

If some test sample has several solutions --- output any of them.

제한

예제 입력 1

4
1
2
3
4

예제 출력 1

impossible
impossible
2 1
2 2

힌트

출처

Contest > Open Cup > 2020/2021 Season > Stage 16: Grand Prix of Urals D번

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

출처

대학교 대회

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

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