結果

問題 No.2239 Friday
ユーザー toshiro_yanagi
提出日時 2025-04-16 23:53:37
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 31 ms / 2,000 ms
コード長 230 bytes
コンパイル時間 390 ms
コンパイル使用メモリ 11,904 KB
実行使用メモリ 10,240 KB
最終ジャッジ日時 2025-04-16 23:53:40
合計ジャッジ時間 2,252 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

def fun(a, b):
    m = abs(a - b)
    n = min(a, b) * 2
    res = abs(n - m)
    while n - m > 0 and n >= 2:
        n -= 2
        m += 2
        res = min(res, abs(n - m))
    return res


print(fun(*map(int, input().split())))
0