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

7114번 - Numbers 다국어

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

문제

During a lesson of algebra Liene has written the following table on the board:

a b a2b ab2
12 2 288 48
-1 -1 -1 -1
9 -3 -243 81

Liene chose integer numbers a un b, 0<|a|<1000, 0<|b|<1000, a ≥ b, wrote these in the first and second column, then calculated the value ab2, wrote it in the third column and, finally, calculated ab2 and wrote it in the fourth column. You can assume that Liene did not make errors in her calculations.

Peter erased some of the numbers in the table and wrote 0 instead:

a b a2b ab2
12 0 288 0
-1 -1 -1 -1
0 0 0 81

Your task is to write a program that from this type of a (Peter's modified) table finds and outputs the starting values of a, b, a2b un ab2. If more than one answer is possible, output the one with the smallest value of the leftmost repairable number.

입력

출력

제한

예제 입력 1

12 0 288 0

예제 출력 1

12 2 288 48

예제 입력 2

0 0 0 81

예제 출력 2

1 -9 -9 81

힌트

출처

Olympiad > Latvian olympiad in informatics > 11th Latvian olympiad in informatics > Stage II (District/City) 2번

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

출처

대학교 대회

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

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