結果

問題 No.91 赤、緑、青の石
コンテスト
ユーザー steek79
提出日時 2015-10-16 16:33:00
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 74 ms / 5,000 ms
コード長 373 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 229 ms
コンパイル使用メモリ 77,348 KB
実行使用メモリ 76,548 KB
最終ジャッジ日時 2025-12-07 12:23:36
合計ジャッジ時間 3,513 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

from math import ceil
ingre = map(int, raw_input().split())

ans = 0

while True:
    make = min(ingre)
    ans += make
    ingre = [i - make for i in ingre]    
    if sum(ingre) <3: break
    else: 
        maximum = max(ingre)
        transfer = int(ceil(maximum/6.0))
        ingre[ingre.index(maximum)] -= transfer*2
        ingre[ingre.index(0)] = transfer

print ans
0