結果

問題 No.1423 Triangle of Multiples
ユーザー lloyzlloyz
提出日時 2022-01-24 20:26:31
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 282 ms / 2,000 ms
コード長 245 bytes
コンパイル時間 110 ms
コンパイル使用メモリ 10,660 KB
実行使用メモリ 7,888 KB
最終ジャッジ日時 2023-08-21 11:39:26
合計ジャッジ時間 2,066 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,848 KB
testcase_01 AC 16 ms
7,764 KB
testcase_02 AC 277 ms
7,840 KB
testcase_03 AC 282 ms
7,848 KB
testcase_04 AC 277 ms
7,888 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

t = int(input())
for _ in range(t):
    L = list(map(int, input().split()))
    idx = L.index(max(L))
    res = sum(L) - L[idx]
    if res <= L[idx]:
        i = L.index(min(L))
        r = L[idx] // L[i]
        L[i] *= r
    print(*L)
0