#P11036. 【MX-X3-T3】「RiOI-4」GCD 与 LCM 问题
【MX-X3-T3】「RiOI-4」GCD 与 LCM 问题
Background
Original problem link: https://oier.team/problems/X3D.
"Since you said you do not understand her, why can you still assert that she must be because of ..."
Yes, I really do not know enough about Lingyu ... Lingluo thought.
In those incomplete memories, she could only recall that the greatest common divisor between her and Lingyu was "music".
What else was missing? Lingluo did not know. She only knew that what was missing, together with "music", was everything she had. The sum of everything.
Tick-tock, tick-tock. Ding-dong, ding-dong. If you piece together the broken piano sounds of different lengths, can you recall something?
Problem Description
Given a positive integer , construct three positive integers such that . There are multiple test cases in one test file.
Since the problem setter wants to put their QQ number into the statement, you need to ensure that .
If there are multiple possible answers, output any one of them.
Input Format
The first line contains a positive integer , indicating the number of test cases.
The next lines each contain one positive integer .
Output Format
Output lines. Each line contains three positive integers .
If there are multiple possible answers, output any one of them.
4
1
2
3
20120712
7 9 2
9 6 8
5 9 2
8065343 8750 6446
Hint
[Sample Explanation]
The constructions in the sample are:
$20\,120\,712+8\,065\,343+8\,750+6\,446=28\,201\,251=\gcd(20\,120\,712,8\,065\,343)+\operatorname{lcm}(8\,750,6\,446)$
It is easy to verify that all of them satisfy the requirement.
[Constraints]
| Test Point | Score | Special Property | ||
|---|---|---|---|---|
| is odd | ||||
For of the testdata, , and .
Translated by ChatGPT 5