結果

問題 No.91 赤、緑、青の石
ユーザー masumasumath1masumasumath1
提出日時 2020-01-04 15:31:36
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 599 bytes
コンパイル時間 250 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-05-02 08:14:33
合計ジャッジ時間 23,921 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 941 ms
10,752 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 32 ms
10,624 KB
testcase_10 AC 31 ms
10,752 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 1,284 ms
10,752 KB
testcase_14 AC 858 ms
10,752 KB
testcase_15 AC 1,376 ms
10,752 KB
testcase_16 AC 31 ms
10,752 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 31 ms
10,752 KB
testcase_25 AC 2,117 ms
10,624 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 1,417 ms
10,752 KB
testcase_31 AC 1,923 ms
10,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def func(n):
    while 1:
        if A[2] >= 3 and A[1] >= 1:
            A[2] -= 2
            A[0] += 1
            A.sort()
            n = makeNeck(n)
        elif A[2] >= 5:
            A[0] -= 4
            A[1] += 1
            A[0] += 1
            A.sort()
            n = makeNeck(n)
        else:
            break
    return n

def makeNeck(n):
    A[0] -= 1
    A[1] -= 1
    A[2] -= 1
    return n+1


A = list(map(int,input().split()))
A.sort()
ans = min(A)
if ans > 0:
    A[0] -= ans
    A[1] -= ans
    A[2] -= ans
else:
    print(0)
    exit()
ans = makeNeck(ans)
print(func(ans))
0