結果
| 問題 | 
                            No.820 Power of Two
                             | 
                    
| コンテスト | |
| ユーザー | 
                             numatanumanuma
                         | 
                    
| 提出日時 | 2019-06-14 02:35:58 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 423 bytes | 
| コンパイル時間 | 1,798 ms | 
| コンパイル使用メモリ | 158,924 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-11-06 13:52:39 | 
| 合計ジャッジ時間 | 2,477 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 3 WA * 7 | 
ソースコード
//(・∀・)ノ
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define print(s) cout<<(s)<<endl
int main() {
    int N, K;
    cin >> N >> K;
    if (N < K){
        print(0);
    }else{
        if (K == 0){
            print(pow(2, N));
        }else{
            print(N - K + 2);
        }
    }
    return 0;
}
            
            
            
        
            
numatanumanuma