結果
問題 | No.820 Power of Two |
ユーザー |
|
提出日時 | 2019-06-11 23:51:53 |
言語 | C++11 (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 317 bytes |
コンパイル時間 | 475 ms |
コンパイル使用メモリ | 61,100 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-08 01:13:35 |
合計ジャッジ時間 | 1,005 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 WA * 9 |
ソースコード
#include<iostream> #include<algorithm> #include<cmath> using namespace std; int main() { int n,k; long long x=1; cin >> n >> k; if(n=k) { cout << 1 << endl; } else if(n>k) { for(int i=0; i<n-k; i++) { x*=2; } cout << x << endl; } else { cout << 0 << endl; } }