結果

問題 No.411 昇順昇順ソート
ユーザー kpinkcat
提出日時 2023-12-12 04:28:52
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 346 bytes
コンパイル時間 1,458 ms
コンパイル使用メモリ 102,100 KB
最終ジャッジ日時 2025-02-18 10:28:17
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>
#include<algorithm>
#include<cctype>
#include<set>
#include<bitset>
#include<math.h>
#include<map>
#include<queue>
#include<iomanip>
using namespace std;
using ll = long long;

int main()
{
    ll n, k;
    cin >> n >> k;
    if (k > 1) cout << pow(2, n-k) << endl;
    else cout << pow(2, n-1) - n << endl;
}
0