結果
| 問題 |
No.820 Power of Two
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-05-22 12:32:31 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 664 bytes |
| コンパイル時間 | 1,785 ms |
| コンパイル使用メモリ | 168,036 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-20 12:29:12 |
| 合計ジャッジ時間 | 2,219 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
const vector<int> dx_2d = {1,-1,0,0};
const vector<int> dy_2d = {0,0,1,-1};
void Yyy(){
cout << "Yes" << endl;
}
void Nnn(){
cout << "No" << endl;
}
void fixprecision(){
cout << fixed << setprecision(20);
}
template<class T> bool chmin(T& a,T b){
if(a > b){
a = b;
return true;
}
else return false;
}
template<class T> bool chmax(T& a,T b){
if(a < b){
a = b;
return true;
}
else return false;
}
int main(){
long long int N,K;
cin >> N >> K;
if(N < K) cout << 0 << endl;
else{
long long int ans = 1;
for(int i=0;i<N-K;i++) ans *= 2;
cout << ans << endl;
}
}