eolymp
bolt
Try our new interface for solving problems
Məsələlər

Identification Codes

Identification Codes

MI6 uses a \textit{Spy Identification Code} (SIC) to identify their spies. For example, J. B.^2 has a SIC of \textbf{7}. The SICs have been assigned to the spies in such a way that MI6 can easily refer to any group of spies by using a status code that is the product of all SICs of the spies in the group. More precisely, the SICs are chosen in such a way that each status code ≥ \textbf{2} refers to a unique group of spies, and for each group of spies there is a unique status code referring to it. Write a program that, given a status code, returns the SICs of the spies that belong to the group corresponding to that status code. __________________ ^2For security reasons his full name is kept secret, but rumour has it that he is one of the jury members. \InputFile On the first line one positive number: the number of test cases, at most \textbf{100}. After that per test case: \begin{itemize} \item one line with an integer \textbf{c} (\textbf{2} ≤ \textbf{c} ≤ \textbf{10^9}): the status code. \end{itemize} \OutputFile Per test case: \begin{itemize} \item one line with a space-separated list of SICs for the status code, in increasing order. \end{itemize}
Zaman məhdudiyyəti 1 saniyə
Yaddaşı istafadə məhdudiyyəti 64 MiB
Giriş verilənləri #1
5
7
12
64
72
1337
Çıxış verilənləri #1
7
3 4
4 16
2 4 9
7 191
Mənbə 2013 Benelux Algorithm Programming Contest (BAPC), Preliminaries, September 28, Problem I