結果

問題 No.2239 Friday
コンテスト
ユーザー Muhammad Ashar Usmani
提出日時 2025-11-17 14:45:09
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 374 bytes
コンパイル時間 254 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 53,684 KB
最終ジャッジ日時 2025-11-17 14:45:11
合計ジャッジ時間 2,182 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 19 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

A, B = map(int, input().split())

if A==1 and B==1:
    print(1)

elif A==B:
    print(0)
elif (A+B)%2==0:
    if 2*min(A,B)>=(A+B)//2:
        print(0)
    else:
        diff = abs(4 * min(A, B) - (A + B))
        print(diff)
else:
    if 2*min(A,B)>=(A+B-1)//2:
        
        print(1)
    else:
        diff = abs(4 * min(A, B) - (A + B))
        print(diff)
    
    
0