結果

問題 No.91 赤、緑、青の石
ユーザー matsu7874matsu7874
提出日時 2015-10-28 13:25:37
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 2,497 ms / 5,000 ms
コード長 330 bytes
コンパイル時間 72 ms
コンパイル使用メモリ 10,516 KB
実行使用メモリ 7,988 KB
最終ジャッジ日時 2023-09-06 12:15:35
合計ジャッジ時間 25,485 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,796 ms
7,936 KB
testcase_01 AC 1,099 ms
7,884 KB
testcase_02 AC 706 ms
7,924 KB
testcase_03 AC 1,295 ms
7,784 KB
testcase_04 AC 616 ms
7,888 KB
testcase_05 AC 1,558 ms
7,832 KB
testcase_06 AC 179 ms
7,832 KB
testcase_07 AC 16 ms
7,788 KB
testcase_08 AC 14 ms
7,820 KB
testcase_09 AC 15 ms
7,872 KB
testcase_10 AC 15 ms
7,776 KB
testcase_11 AC 470 ms
7,756 KB
testcase_12 AC 1,416 ms
7,792 KB
testcase_13 AC 1,491 ms
7,860 KB
testcase_14 AC 1,043 ms
7,880 KB
testcase_15 AC 1,640 ms
7,820 KB
testcase_16 AC 15 ms
7,792 KB
testcase_17 AC 15 ms
7,820 KB
testcase_18 AC 15 ms
7,844 KB
testcase_19 AC 15 ms
7,812 KB
testcase_20 AC 15 ms
7,832 KB
testcase_21 AC 14 ms
7,852 KB
testcase_22 AC 15 ms
7,784 KB
testcase_23 AC 15 ms
7,740 KB
testcase_24 AC 15 ms
7,816 KB
testcase_25 AC 2,497 ms
7,780 KB
testcase_26 AC 2,332 ms
7,988 KB
testcase_27 AC 14 ms
7,924 KB
testcase_28 AC 15 ms
7,812 KB
testcase_29 AC 34 ms
7,820 KB
testcase_30 AC 1,772 ms
7,776 KB
testcase_31 AC 2,305 ms
7,776 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

s = list(map(int, input().split()))
s.sort()
total = s[0]
for i in range(3):
    s[i] -= total
while s[1] > 0 and s[2] > 0 and (s[1] > 2 or s[2] > 2):
    if s[1] > s[2]:
        total += 1
        s[1] -= 3
        s[2] -= 1
    else:
        total += 1
        s[1] -= 1
        s[2] -= 3
s.sort()
total += s[2]//5
print(total)
0