結果
問題 | No.1860 Magnets |
ユーザー |
|
提出日時 | 2022-03-04 21:39:15 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 821 bytes |
コンパイル時間 | 165 ms |
コンパイル使用メモリ | 82,324 KB |
実行使用メモリ | 62,936 KB |
最終ジャッジ日時 | 2024-07-18 19:42:24 |
合計ジャッジ時間 | 2,658 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 WA * 6 |
ソースコード
# import sys# input = sys.stdin.readline# import pypyjit# pypyjit.set_param('max_unroll_recursion=-1')def mp():return map(int,input().split())def lmp():return list(map(int,input().split()))def mps(A):return [tuple(map(int, input().split())) for _ in range(A)]def stoi(LIST):return list(map(int,LIST))def itos(LIST):return list(map(str,LIST))def bitA(X,A):return X & 1<<A == 1<<Aimport mathimport bisectimport heapqimport timefrom copy import copy as ccfrom copy import deepcopy as dcfrom itertools import accumulate, productfrom collections import Counter, defaultdict, dequedef ceil(U,V):return (U+V-1)//Vdef modf1(N,MOD):return (N-1)%MOD+1inf = int(1e18+20)mod = 998244353a,b = mp()if a > b:a,b = b,aif a == b == 0:print(0)elif a == 0:print(b*2-1)else:print(a*2+(b-a)*2-1)