結果

問題 No.1423 Triangle of Multiples
ユーザー moharan627
提出日時 2021-03-12 21:59:37
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 166 ms / 2,000 ms
コード長 626 bytes
コンパイル時間 239 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-10-14 12:23:07
合計ジャッジ時間 1,427 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
sys.setrecursionlimit(10 ** 6)
def II(): return int(sys.stdin.readline())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LC(): return list(input())
def IC(): return [int(c) for c in input()]
def MI(): return map(int, sys.stdin.readline().split())
INF = float('inf')
def solve():
    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 = II()
    for i in range(T):
        ABC = LI()
        LCM = my_lcm(*ABC)
        print(LCM,LCM,LCM)
    return
solve()
0