結果

問題 No.1860 Magnets
ユーザー miya145592miya145592
提出日時 2023-05-05 23:39:20
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 72 ms / 2,000 ms
コード長 119 bytes
コンパイル時間 287 ms
コンパイル使用メモリ 86,812 KB
実行使用メモリ 71,412 KB
最終ジャッジ日時 2023-08-15 06:56:59
合計ジャッジ時間 3,847 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,172 KB
testcase_01 AC 69 ms
71,176 KB
testcase_02 AC 68 ms
71,088 KB
testcase_03 AC 65 ms
71,004 KB
testcase_04 AC 68 ms
71,104 KB
testcase_05 AC 64 ms
70,868 KB
testcase_06 AC 61 ms
71,060 KB
testcase_07 AC 66 ms
71,068 KB
testcase_08 AC 68 ms
70,868 KB
testcase_09 AC 67 ms
71,380 KB
testcase_10 AC 63 ms
71,112 KB
testcase_11 AC 64 ms
70,816 KB
testcase_12 AC 66 ms
71,396 KB
testcase_13 AC 66 ms
71,068 KB
testcase_14 AC 65 ms
71,096 KB
testcase_15 AC 67 ms
71,284 KB
testcase_16 AC 65 ms
71,096 KB
testcase_17 AC 65 ms
70,820 KB
testcase_18 AC 63 ms
71,316 KB
testcase_19 AC 63 ms
71,368 KB
testcase_20 AC 61 ms
71,224 KB
testcase_21 AC 65 ms
71,392 KB
testcase_22 AC 63 ms
71,180 KB
testcase_23 AC 63 ms
71,144 KB
testcase_24 AC 68 ms
71,340 KB
testcase_25 AC 67 ms
71,384 KB
testcase_26 AC 64 ms
71,320 KB
testcase_27 AC 69 ms
71,412 KB
testcase_28 AC 66 ms
71,144 KB
testcase_29 AC 63 ms
71,228 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A, B = map(int, input().split())
if A<B:
    A, B = B, A
cnt = 2*B
A-=B
if A>0:
    cnt+=1
    A-=1
cnt+=2*A
print(cnt)
0