結果

問題 No.91 赤、緑、青の石
ユーザー sue_charo
提出日時 2017-08-07 00:33:11
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 1,183 ms / 5,000 ms
コード長 429 bytes
コンパイル時間 94 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-06-24 07:11:17
合計ジャッジ時間 12,843 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

# 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