結果

問題 No.91 赤、緑、青の石
ユーザー Himatsubushin
提出日時 2022-02-03 15:30:59
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 304 bytes
コンパイル時間 133 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-06-11 09:56:47
合計ジャッジ時間 1,664 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 2
other AC * 19 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

n = [0, 0, 0]
n[0], n[1], n[2] = map(int, input().split())
if min(n) == 0 and max(n) < 3:
    print(0)
else:
    n.sort()
    a = n[1] - n[0]
    b = n[2] - n[0]
    x = int((a + b) / 4) + n[0]
    if a % 2 == 0 and b % 2 == 0:
        x -= 1
    if a % 2 == 1 and b % 2 == 1:
        x -= 1
    print(x)
0