結果

問題 No.1423 Triangle of Multiples
ユーザー c-yanc-yan
提出日時 2021-03-12 22:33:04
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 262 ms / 2,000 ms
コード長 202 bytes
コンパイル時間 331 ms
コンパイル使用メモリ 10,676 KB
実行使用メモリ 8,052 KB
最終ジャッジ日時 2023-08-04 15:55:17
合計ジャッジ時間 1,691 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,884 KB
testcase_01 AC 15 ms
8,040 KB
testcase_02 AC 262 ms
7,940 KB
testcase_03 AC 228 ms
7,864 KB
testcase_04 AC 227 ms
8,052 KB
権限があれば一括ダウンロードができます

ソースコード

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