結果

問題 No.1423 Triangle of Multiples
ユーザー 8nd5t8nd5t
提出日時 2021-03-12 21:25:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 141 ms / 2,000 ms
コード長 699 bytes
コンパイル時間 350 ms
コンパイル使用メモリ 81,776 KB
実行使用メモリ 77,808 KB
最終ジャッジ日時 2024-04-22 12:07:23
合計ジャッジ時間 1,641 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
60,908 KB
testcase_01 AC 53 ms
62,560 KB
testcase_02 AC 141 ms
77,092 KB
testcase_03 AC 118 ms
77,808 KB
testcase_04 AC 118 ms
77,756 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys,math,itertools
from collections import Counter,deque,defaultdict
from bisect import bisect_left,bisect_right 
from heapq import heappop,heappush,heapify, nlargest
from copy import deepcopy
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_1(): return list(map(lambda x:int(x)-1, sys.stdin.readline().split()))
def inps(): return sys.stdin.readline()
def inpsl(x): tmp = sys.stdin.readline(); return list(tmp[:x])
def err(x): print(x); exit()

def lcm(a,b):
    return a*b//math.gcd(a,b)
for _ in range(inp()):
    a = inpl()
    l = 1
    for x in a:
        l = lcm(l,x)
    print(l,l,l)
0