結果

問題 No.920 あかあお
ユーザー _KingdomOfMoray_KingdomOfMoray
提出日時 2019-12-15 22:38:38
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 429 bytes
コンパイル時間 80 ms
コンパイル使用メモリ 10,708 KB
実行使用メモリ 8,012 KB
最終ジャッジ日時 2023-09-15 15:50:02
合計ジャッジ時間 1,139 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,824 KB
testcase_01 AC 16 ms
7,816 KB
testcase_02 AC 16 ms
8,012 KB
testcase_03 AC 16 ms
7,824 KB
testcase_04 AC 16 ms
7,872 KB
testcase_05 AC 16 ms
7,852 KB
testcase_06 WA -
testcase_07 AC 17 ms
7,800 KB
testcase_08 AC 16 ms
7,884 KB
testcase_09 AC 16 ms
7,828 KB
testcase_10 AC 16 ms
7,788 KB
testcase_11 AC 16 ms
7,956 KB
testcase_12 WA -
testcase_13 AC 16 ms
7,852 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

input_list = list(map(int,input().split()))
x = input_list[0]
y = input_list[1]
z = input_list[2]

res = 0

def min(a, b):
    if a >= b:
        return b
    else:
        return a

# 青と赤の差を白で埋める
delta = x - y
change = min(abs(delta), z)

if delta > 0:
    y += change
    z -= change
elif delta < 0:
    x += change
    z -= change
    
res += x
# 残った白で紫を作る
res += int(z / 2)

print(res)
0