結果

問題 No.2239 Friday
ユーザー ohana
提出日時 2023-11-06 17:13:39
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 288 bytes
コンパイル時間 190 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 51,840 KB
最終ジャッジ日時 2024-09-25 23:05:07
合計ジャッジ時間 1,631 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 17 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

a, b = map(int, input().split())
t = min(a, b) * 2
f = a + b - t
cnt = f
if t < f:
    print(abs(t - f))
else:
    tmp = abs(t - f)
    while abs((t - 1) - (f + 1)) < tmp and 0 <= t - 1 and 0 < cnt:
        cnt -= 1
        t, f = t - 1, f + 1
        tmp = abs((t) - (f))
    print(tmp)
0