結果

問題 No.1423 Triangle of Multiples
ユーザー 👑 H20H20
提出日時 2021-03-12 21:42:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 191 ms / 2,000 ms
コード長 198 bytes
コンパイル時間 200 ms
コンパイル使用メモリ 81,844 KB
実行使用メモリ 77,012 KB
最終ジャッジ日時 2024-04-22 12:32:21
合計ジャッジ時間 1,461 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,832 KB
testcase_01 AC 37 ms
53,244 KB
testcase_02 AC 191 ms
76,508 KB
testcase_03 AC 166 ms
77,012 KB
testcase_04 AC 173 ms
76,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
#最大公約数
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

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