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

11208번 - Falling Mugs 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 256 MB127585049.505%

문제

Susan is making high-speed videos of falling coffee mugs. When analyzing the videos she wants to know how big the mugs are, but unfortunately they all got destroyed during filming. Susan knows some physics though, so she has figured out how far they moved between different video frames. The camera was filming at a speed of 70 frames per second, which means that at frame n, counted from when the mug was released, the number of millimeters it has moved is d = n2. The counting of the frames starts at 0.

Susan thinks a certain mug is D millimeters high, but to verify this she needs to find two frames between which the mug has moved exactly this distance. Can you help her do this?

입력

The input file contains the single positive integer D ≤ 200 000, the distance to be measured.

출력

Output two non-negative integers n1 and n2, the numbers of the frames that Susan should compare. They should fulfill n22 − n12 = D. If no two such integers exist, instead output “impossible”.

제한

예제 입력 1

88

예제 출력 1

9 13

예제 입력 2

86

예제 출력 2

impossible

힌트

출처

Contest > KTH Challenge > KTH Challenge 2014 F번

  • 문제를 만든 사람: Ulf Lundström
(追記) (追記ここまで)

출처

대학교 대회

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

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