結果

問題 No.1860 Magnets
ユーザー SidewaysOwlSidewaysOwl
提出日時 2022-03-04 21:28:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 70 ms / 2,000 ms
コード長 118 bytes
コンパイル時間 275 ms
コンパイル使用メモリ 87,312 KB
実行使用メモリ 71,496 KB
最終ジャッジ日時 2023-09-25 23:52:36
合計ジャッジ時間 3,567 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,320 KB
testcase_01 AC 69 ms
71,424 KB
testcase_02 AC 67 ms
71,200 KB
testcase_03 AC 69 ms
71,276 KB
testcase_04 AC 70 ms
71,420 KB
testcase_05 AC 67 ms
71,288 KB
testcase_06 AC 66 ms
71,036 KB
testcase_07 AC 68 ms
71,324 KB
testcase_08 AC 68 ms
71,336 KB
testcase_09 AC 67 ms
71,280 KB
testcase_10 AC 68 ms
71,176 KB
testcase_11 AC 68 ms
71,240 KB
testcase_12 AC 67 ms
71,196 KB
testcase_13 AC 67 ms
71,496 KB
testcase_14 AC 68 ms
71,492 KB
testcase_15 AC 68 ms
71,236 KB
testcase_16 AC 68 ms
71,328 KB
testcase_17 AC 67 ms
71,260 KB
testcase_18 AC 67 ms
71,128 KB
testcase_19 AC 66 ms
71,276 KB
testcase_20 AC 67 ms
71,328 KB
testcase_21 AC 68 ms
71,420 KB
testcase_22 AC 67 ms
71,132 KB
testcase_23 AC 69 ms
71,424 KB
testcase_24 AC 66 ms
71,380 KB
testcase_25 AC 69 ms
71,032 KB
testcase_26 AC 68 ms
71,388 KB
testcase_27 AC 66 ms
71,356 KB
testcase_28 AC 66 ms
71,328 KB
testcase_29 AC 67 ms
71,396 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a,b = map(int,input().split())
if a >= b:
    a,b = b,a
ans = a * 2 +  + (1 + (b-a-1) * 2 if a != b else 0)
print(ans)
0