問題一覧 > 通常問題

No.3301 Make Right Triangle

レベル : / AI推定難易度 : 700 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / スペシャルジャッジ問題 (複数の解が存在する可能性があります)
タグ : (AC するまで非表示) / 解いたユーザー数 100
作問者 : sepa38 / テスター : dyktr_06 Nafmo2 hanba-gu1
お気に入りにしたユーザー ProblemId : 11246 / 自分の提出
問題文最終更新日: 2025-10-04 23:04:39
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もしくは右上の雲マークをクリックしてアカウントを作成してください。