結果

問題 No.1423 Triangle of Multiples
ユーザー k_o_pasture
提出日時 2021-03-12 21:48:57
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 273 bytes
コンパイル時間 108 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-10-14 12:09:05
合計ジャッジ時間 1,599 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1
other WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
from functools import reduce

def my_lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

def my_lcm(*numbers):
    return reduce(my_lcm_base, numbers, 1)

T = int(input())
for t in range(T):
    a,b,c = map(int, input().split(" "))
    print(my_lcm(*[a,b,c]))
0