No.3301 Make Right Triangle
問題文最終更新日: 2025-10-04 23:04:39
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
yukicoder contest MMA Contest 020
(順位表)
の他の問題:
Problem Statement
Construct a right triangle that has a side of length $L$ and whose side lengths are all positive integers.
Constraints
- All inputs are integers.
- $1 \leq T \leq 10^5$
- $3 \leq L_i \leq 10^9$
Input
You are given $T$ test cases.$T$ $L_1$ $L_2$ $\vdots$ $L_T$
Output
When the side lengths of the constructed triangle are $A, B, C$, output $A, B, C$. $A, B, C$ may be in any order.
$A_1 \ B_1 \ C_1$ $A_2 \ B_2 \ C_2$ $\vdots$ $A_T \ B_T \ C_T$
Sample
Sample 1
Input
5 4 5 17282855 998244353 721138768
Output
3 4 5 5 3 4 17282855 41478852 44935423 247210328 967149855 998244353 721138768 1710661587870180 1710661587870332
The output sides may include lengths exceeding $10^9$.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
sepa38