結果

問題 No.91 赤、緑、青の石
ユーザー titiatitia
提出日時 2022-04-17 02:08:47
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 659 ms / 5,000 ms
コード長 283 bytes
コンパイル時間 1,536 ms
コンパイル使用メモリ 86,972 KB
実行使用メモリ 76,700 KB
最終ジャッジ日時 2023-08-26 22:30:49
合計ジャッジ時間 9,522 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 481 ms
76,584 KB
testcase_01 AC 337 ms
76,300 KB
testcase_02 AC 232 ms
76,444 KB
testcase_03 AC 369 ms
76,424 KB
testcase_04 AC 217 ms
76,420 KB
testcase_05 AC 419 ms
76,504 KB
testcase_06 AC 152 ms
76,304 KB
testcase_07 AC 68 ms
71,144 KB
testcase_08 AC 69 ms
71,552 KB
testcase_09 AC 69 ms
71,332 KB
testcase_10 AC 69 ms
71,612 KB
testcase_11 AC 171 ms
76,552 KB
testcase_12 AC 402 ms
76,244 KB
testcase_13 AC 450 ms
76,380 KB
testcase_14 AC 311 ms
76,444 KB
testcase_15 AC 460 ms
76,436 KB
testcase_16 AC 67 ms
71,252 KB
testcase_17 AC 68 ms
71,384 KB
testcase_18 AC 71 ms
71,652 KB
testcase_19 AC 68 ms
71,260 KB
testcase_20 AC 67 ms
71,316 KB
testcase_21 AC 68 ms
71,384 KB
testcase_22 AC 69 ms
71,612 KB
testcase_23 AC 68 ms
71,320 KB
testcase_24 AC 69 ms
71,340 KB
testcase_25 AC 659 ms
76,252 KB
testcase_26 AC 618 ms
76,700 KB
testcase_27 AC 68 ms
71,304 KB
testcase_28 AC 110 ms
76,472 KB
testcase_29 AC 153 ms
76,620 KB
testcase_30 AC 452 ms
76,376 KB
testcase_31 AC 598 ms
76,620 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A=list(map(int,input().split()))
A.sort()
ANS=0

while True:
    A.sort()
    #print(A,ANS)

    if A[0]>0:
        ANS+=A[0]
        
        A[1]-=A[0]
        A[2]-=A[0]
        A[0]-=A[0]
    else:
        if A[2]<=1:
            break
        A[2]-=2
        A[0]+=1

print(ANS)
0