結果

問題 No.1423 Triangle of Multiples
ユーザー c-yan
提出日時 2021-03-12 22:33:04
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 306 ms / 2,000 ms
コード長 202 bytes
コンパイル時間 158 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-10-14 13:06:17
合計ジャッジ時間 1,754 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import gcd

def lcm(x, y):
    return x * y // gcd(x, y)

T = int(input())

for _ in range(T):
    A, B, C = map(int, input().split())
    x = lcm(lcm(A, B), C)
    print(x + A, x + B, x + C)
0