結果

問題 No.1860 Magnets
ユーザー U SU S
提出日時 2022-03-04 21:41:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 123 ms / 2,000 ms
コード長 849 bytes
コンパイル時間 285 ms
コンパイル使用メモリ 87,020 KB
実行使用メモリ 74,264 KB
最終ジャッジ日時 2023-09-26 00:26:16
合計ジャッジ時間 5,082 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 108 ms
73,920 KB
testcase_01 AC 114 ms
73,920 KB
testcase_02 AC 114 ms
73,916 KB
testcase_03 AC 113 ms
73,936 KB
testcase_04 AC 111 ms
74,064 KB
testcase_05 AC 109 ms
73,944 KB
testcase_06 AC 111 ms
73,920 KB
testcase_07 AC 113 ms
74,260 KB
testcase_08 AC 113 ms
73,684 KB
testcase_09 AC 114 ms
74,192 KB
testcase_10 AC 112 ms
74,040 KB
testcase_11 AC 114 ms
74,044 KB
testcase_12 AC 111 ms
74,068 KB
testcase_13 AC 113 ms
73,808 KB
testcase_14 AC 110 ms
74,064 KB
testcase_15 AC 110 ms
74,048 KB
testcase_16 AC 112 ms
73,804 KB
testcase_17 AC 113 ms
74,168 KB
testcase_18 AC 115 ms
74,180 KB
testcase_19 AC 123 ms
73,808 KB
testcase_20 AC 118 ms
74,104 KB
testcase_21 AC 110 ms
73,756 KB
testcase_22 AC 110 ms
74,040 KB
testcase_23 AC 109 ms
73,872 KB
testcase_24 AC 112 ms
73,924 KB
testcase_25 AC 110 ms
73,992 KB
testcase_26 AC 107 ms
73,900 KB
testcase_27 AC 108 ms
74,264 KB
testcase_28 AC 109 ms
74,180 KB
testcase_29 AC 109 ms
73,804 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# 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<<A
import math
import bisect
import heapq
import time
from copy import copy as cc
from copy import deepcopy as dc
from itertools import accumulate, product
from collections import Counter, defaultdict, deque
def ceil(U,V):return (U+V-1)//V
def modf1(N,MOD):return (N-1)%MOD+1
inf = int(1e18+20)
mod = 998244353

a,b = mp()
if a > b:
    a,b = b,a
if a == b == 0:
    print(0)
elif a == 0:
    print(b*2-1)
elif a == b:
    print(a*2)
else:
    print(a*2+(b-a)*2-1)
0