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

23595번 - Quadratic equation 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 (추가 시간 없음) 256 MB152695642.748%

문제

Ted has just been accepted to the university, afer passing the exams successfully. During his preparation for the exams, Ted solved several thousands of similar problems. For instance, he solved tons of quadratic equations, again and again and again. He's decided to make up his own problems, because after the exams, he's free to do anything! Ted is wondering - why does one always have to find the roots of the equation, and not vice versa - to find the equation for a root? First, he decided to experiment with what has been his favorite type of equations since the ninth grade --- the quadratic equations. But he discovered a new problem here -- he is not knowledgeable enough, because this problem is not typical.

Help Ted solve this new task!

입력

The first line of the input file contains an integer $T$ --- the number of test cases (1ドル \le T \le 100$). It is followed by $T$ lines -- one per each case.

Each line contains one non-zero integer $Y$ --- the root of a quadratic equation (1ドル \le |Y| \le 10^6$).

출력

The output file must contain $T$ lines, and the $i$-th line must have the answer to the $i$-th test case. The answer must contain three space-separated integers $A_i,ドル $B_i,ドル $C_i,ドル such that the $i$-th input number is a root of the quadratic equation $A_iX^2+B_iX+C_i = 0$.

All coefficients must be non-zero and not greater than 10ドル^6$ in absolute value. If the required equation is not unique, print the coefficients of any one of them. It is guaranteed that at least one equation exists in each case.

제한

예제 입력 1

2
1
-2

예제 출력 1

2 -3 1
3 2 -8

힌트

출처

Contest > Open Cup > 2018/2019 Season > Stage 4: Grand Prix of Eurasia E번

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

출처

대학교 대회

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

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