結果

問題 No.1423 Triangle of Multiples
ユーザー gorugo30gorugo30
提出日時 2021-03-16 19:31:31
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 196 ms / 2,000 ms
コード長 255 bytes
コンパイル時間 167 ms
コンパイル使用メモリ 82,196 KB
実行使用メモリ 78,000 KB
最終ジャッジ日時 2024-04-25 21:20:40
合計ジャッジ時間 1,337 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
53,136 KB
testcase_01 AC 33 ms
53,552 KB
testcase_02 AC 196 ms
77,328 KB
testcase_03 AC 195 ms
78,000 KB
testcase_04 AC 195 ms
77,732 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())
for case in range(T):
    A, B, C = map(int, input().split())
    O = [A, B, C]
    X = [A, B, C]
    if sum(X) <= 2 * max(X):
        i = X.index(min(X))
        X[i] += O[i] * ((2 * max(X) - sum(X) + 1 + O[i] - 1) // O[i])
    print(*X)
0