結果

問題 No.1423 Triangle of Multiples
ユーザー moharan627moharan627
提出日時 2021-03-12 21:59:37
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 186 ms / 2,000 ms
コード長 626 bytes
コンパイル時間 172 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-04-22 12:55:37
合計ジャッジ時間 1,379 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
10,880 KB
testcase_01 AC 36 ms
10,880 KB
testcase_02 AC 186 ms
11,008 KB
testcase_03 AC 157 ms
10,880 KB
testcase_04 AC 158 ms
11,008 KB
権限があれば一括ダウンロードができます

ソースコード

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