結果

問題 No.2239 Friday
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2023-03-11 20:03:46
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 53 ms / 2,000 ms
コード長 271 bytes
コンパイル時間 307 ms
コンパイル使用メモリ 82,392 KB
実行使用メモリ 55,680 KB
最終ジャッジ日時 2024-09-18 06:43:34
合計ジャッジ時間 2,044 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import *
from itertools import *
from functools import *
from heapq import *
import sys,math
input = sys.stdin.readline

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

if B>A:
    A,B = B,A

ans = A+B
for i in range(B+1):
    
    ans = min(ans,abs(A+B-4*i))
print(ans)
0