結果

問題 No.411 昇順昇順ソート
ユーザー ああいいああいい
提出日時 2022-05-17 16:46:43
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 220 bytes
コンパイル時間 893 ms
コンパイル使用メモリ 87,088 KB
実行使用メモリ 71,592 KB
最終ジャッジ日時 2023-10-13 14:45:31
合計ジャッジ時間 4,448 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
71,360 KB
testcase_01 AC 63 ms
71,292 KB
testcase_02 AC 63 ms
71,052 KB
testcase_03 AC 63 ms
71,204 KB
testcase_04 AC 63 ms
71,308 KB
testcase_05 AC 63 ms
71,316 KB
testcase_06 AC 63 ms
71,148 KB
testcase_07 AC 67 ms
71,084 KB
testcase_08 AC 70 ms
71,312 KB
testcase_09 AC 64 ms
71,048 KB
testcase_10 AC 65 ms
71,340 KB
testcase_11 AC 64 ms
71,232 KB
testcase_12 AC 64 ms
71,224 KB
testcase_13 AC 66 ms
71,396 KB
testcase_14 AC 64 ms
71,356 KB
testcase_15 AC 66 ms
71,420 KB
testcase_16 AC 65 ms
71,424 KB
testcase_17 AC 64 ms
71,048 KB
testcase_18 AC 64 ms
71,260 KB
testcase_19 AC 64 ms
71,072 KB
testcase_20 AC 63 ms
71,380 KB
testcase_21 AC 62 ms
71,292 KB
testcase_22 AC 62 ms
71,356 KB
testcase_23 AC 62 ms
71,380 KB
testcase_24 WA -
testcase_25 AC 63 ms
71,052 KB
testcase_26 AC 62 ms
71,232 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 61 ms
71,120 KB
testcase_30 AC 64 ms
71,228 KB
testcase_31 AC 63 ms
71,220 KB
testcase_32 AC 66 ms
71,228 KB
testcase_33 AC 66 ms
71,436 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K = map(int,input().split())

import sys

if K == 1 and N == 2:
    print(0)
    exit()
if K == N:
    print(1)
    exit()

if K == 1:
    ans = 2 ** (N - 1) - (N - 1)
    print(ans)
    exit()
u = N - K
print(2 ** u)
0