P11036 [MX-X3-T3] "RiOI-4" GCD and LCM Problem
Background
Original problem link: .
---
"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?
Description
Given a positive integer $a$, construct three positive integers $b, c, d$ such that $a+b+c+d=\gcd(a,b)+\operatorname{lcm}(c,d)$. 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 $b, c, d\le 1\,634\,826\,193$.
**If there are multiple possible answers, output any one of them.**
Input Format
**The first line contains a positive integer $t$, indicating the number of test cases.**
The next $t$ lines each contain one positive integer $a$.
Output Format
Output $t$ lines. Each line contains three positive integers $b, c, d$.
**If there are multiple possible answers, output any one of them.**
Explanation/Hint
**[Sample Explanation]**
The constructions in the sample are:
$1+7+9+2=19=\gcd(1,7)+\operatorname{lcm}(9,2)$
$2+9+6+8=25=\gcd(2,9)+\operatorname{lcm}(6,8)$
$3+5+9+2=19=\gcd(3,5)+\operatorname{lcm}(9,2)$
$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|$t\le$|$a\le$|Special Property|
|:-:|:-:|:-:|:-:|:-:|
|$1$|$2$|$10$|$10$||
|$2$|$5$|$50$|$50$||
|$3$|$17$|$10^6$|$5\times10^8$||
|$4$|$29$|$10^6$|$10^9-1$|$a$ is odd|
|$5$|$47$|$2\times10^6$|$10^9$||
For $100\%$ of the testdata, $1\le t\le 2\times10^6$, and $1\le a\le 10^9$.
Translated by ChatGPT 5