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

17870번 - Problematic Public Keys 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 512 MB109774866.667%

문제

On February 15, 2012, the New York Times reported a flaw in the method of generating keys for a public-key encryption system (“Researchers Find a Flaw in a Widely Used Online Encryption Method" by John Markoff). This flaw enables an attacker to determine private keys given a set of flawed public keys.

Your job is to write a program that takes flawed public keys and determines the corresponding private keys. For the purposes of this problem, a private key consists of a pair of prime numbers,

2 < K1, K2 < 231

and the corresponding public key consists of the product K1 × K2.

입력

The first line of the input contains an integer value, M (2 ≤ M ≤ 100). M is the number of input lines that follow. Each of the M lines contains a single “public key." Each public key is the product of exactly two prime numbers and will fit in a 32-bit unsigned integer.

출력

The output lines produced by your program should contain the unique prime factors of the input data values in ascending numeric order, five per line, except for the last line. Output values on the same line are separated by a single space.

제한

예제 입력 1

6
221
391
713
1457
901
299

예제 출력 1

13 17 23 31 47
53

예제 입력 2

2
2143650557
2140117121

예제 출력 2

32717 65413 65521

힌트

출처

ICPC > Regionals > North America > Greater New York Region > 2019 Greater New York Programming Contest H번

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

출처

대학교 대회

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

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