結果

問題 No.1860 Magnets
ユーザー chineristACchineristAC
提出日時 2022-03-04 22:04:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 111 ms / 2,000 ms
コード長 391 bytes
コンパイル時間 463 ms
コンパイル使用メモリ 87,272 KB
実行使用メモリ 75,032 KB
最終ジャッジ日時 2023-09-26 01:05:36
合計ジャッジ時間 5,477 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 106 ms
74,660 KB
testcase_01 AC 111 ms
74,804 KB
testcase_02 AC 106 ms
74,456 KB
testcase_03 AC 106 ms
74,860 KB
testcase_04 AC 107 ms
74,468 KB
testcase_05 AC 107 ms
74,676 KB
testcase_06 AC 108 ms
74,844 KB
testcase_07 AC 107 ms
74,440 KB
testcase_08 AC 108 ms
74,864 KB
testcase_09 AC 108 ms
74,440 KB
testcase_10 AC 108 ms
74,668 KB
testcase_11 AC 107 ms
74,900 KB
testcase_12 AC 109 ms
74,576 KB
testcase_13 AC 106 ms
74,888 KB
testcase_14 AC 107 ms
74,664 KB
testcase_15 AC 107 ms
74,856 KB
testcase_16 AC 107 ms
74,756 KB
testcase_17 AC 107 ms
74,536 KB
testcase_18 AC 108 ms
74,468 KB
testcase_19 AC 107 ms
75,032 KB
testcase_20 AC 108 ms
74,840 KB
testcase_21 AC 108 ms
74,524 KB
testcase_22 AC 107 ms
74,940 KB
testcase_23 AC 108 ms
74,712 KB
testcase_24 AC 107 ms
74,868 KB
testcase_25 AC 106 ms
74,868 KB
testcase_26 AC 107 ms
74,904 KB
testcase_27 AC 108 ms
74,752 KB
testcase_28 AC 105 ms
74,856 KB
testcase_29 AC 106 ms
74,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys,random,bisect
from collections import deque,defaultdict
from heapq import heapify,heappop,heappush
from itertools import permutations
from math import log,gcd

input = lambda :sys.stdin.readline().rstrip()
mi = lambda :map(int,input().split())
li = lambda :list(mi())

X,Y = mi()
if X==Y:
    print(X+Y)
elif X < Y:
    print(Y+X+(Y+X-1)-(2*X))
else:
    print(Y+X+(Y+X-1)-(2*Y))
0