問題一覧 > 通常問題

No.1423 Triangle of Multiples

レベル : / AI推定難易度 : 475 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / スペシャルジャッジ問題 (複数の解が存在する可能性があります)
タグ : (AC するまで非表示) / 解いたユーザー数 239
作問者 : 👑 箱星 / テスター : lynmisakura
お気に入りにしたユーザー ProblemId : 5395 / 自分の提出
問題文最終更新日: 2022-04-25 23:55:33
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 286 (順位表) の他の問題:

Problem Statement

You are given positive integers $A,B,C$. Find one triple of positive integers $x,y,z$ satisfying all of the following conditions.

  • There exists a non-degenerate triangle whose $3$ side lengths are $x,y,z$. Here, a triangle is non-degenerate if its $3$ vertices do not lie on the same line.
  • $x$ is a multiple of $A$
  • $y$ is a multiple of $B$
  • $z$ is a multiple of $C$
  • $1\le x,y,z\le 10^{18}$

It can be proved that such $x,y,z$ always exist under the constraints of this problem.

You are given $T$ test cases; solve each of them.

Input

$T$
$\text{case}_1$
$\text{case}_2$
$\vdots$
$\text{case}_T$

Each case is given in the following format.

$A$ $B$ $C$
  • All input values are integers
  • $1\le T\le 3\times 10^4$
  • $1\le A,B,C\le 10^6$

Output

Output $T$ lines. On the $i$-th line, output one triple $x,y,z$ satisfying the conditions for the $i$-th test case, separated by spaces.

If there are multiple answers, you may output any of them.

Note that extra trailing whitespace will result in WA.

Sample

Sample 1
Input
1
1 2 3
Output
3 4 6

The triangle with $3$ side lengths $3,4,6$ is non-degenerate. Any other output satisfying the conditions will also be accepted.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。