結果

問題 No.91 赤、緑、青の石
コンテスト
ユーザー sue_charo
提出日時 2017-08-07 00:33:11
言語 Python3
(3.14.2 + numpy 2.4.0 + scipy 1.16.3)
結果
AC  
実行時間 1,260 ms / 5,000 ms
コード長 429 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 120 ms
コンパイル使用メモリ 12,160 KB
実行使用メモリ 10,496 KB
最終ジャッジ日時 2025-12-07 12:30:41
合計ジャッジ時間 14,045 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

# coding: utf-8
def II(): return int(input())
def ILI(): return list(map(int, input().split()))


def read():
    R, G, B = ILI()
    return R, G, B


def solve(R, G, B):
    rgb = [R, G, B]
    rgb.sort()
    while rgb[2] - rgb[0] > 1:
        rgb[2] -= 2
        rgb[0] += 1
        rgb.sort()

    ans = rgb[0]
    return ans


def main():
    params = read()
    print(solve(*params))


if __name__ == "__main__":
    main()
0