結果

問題 No.920 あかあお
ユーザー もぐら 3.0
提出日時 2023-11-20 23:22:06
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 36 ms / 2,000 ms
コード長 332 bytes
コンパイル時間 162 ms
コンパイル使用メモリ 82,420 KB
実行使用メモリ 52,224 KB
最終ジャッジ日時 2024-09-26 06:45:08
合計ジャッジ時間 1,336 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

X,Y,Z = map(int,input().split())

if Z==0:
    print(min(X,Y))
else:
    if X<Y:
        if Y-X>=Z:
            print(X+Z)
        else:
            Z-=(Y-X)
            print(Y+Z//2)
    elif X>Y:
        if X-Y>=Z:
            print(Y+Z)
        else:
            Z-=(X-Y)
            print(X+Z//2)
    else:
        print(X+Z//2)
0