結果

問題 No.1423 Triangle of Multiples
ユーザー convexineqconvexineq
提出日時 2021-03-12 21:32:02
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 208 ms / 2,000 ms
コード長 359 bytes
コンパイル時間 195 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 77,696 KB
最終ジャッジ日時 2024-04-22 12:18:03
合計ジャッジ時間 1,560 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
51,584 KB
testcase_01 AC 38 ms
51,996 KB
testcase_02 AC 208 ms
77,696 KB
testcase_03 AC 198 ms
77,520 KB
testcase_04 AC 193 ms
77,504 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve(lst):
    a,b,c = lst
    m = min(a,b,c)
    lst.sort()
    if a == m:
        x = (lst[2]-lst[1])//a+1
        a *= x
    if b == m:
        x = (lst[2]-lst[1])//b+1
        b *= x
    if c == m:
        x = (lst[2]-lst[1])//c+1
        c *= x
    return a,b,c

T = int(input())
for _ in range(T):
    print(*solve(list(map(int,input().split()))))
0