結果
| 問題 |
No.820 Power of Two
|
| コンテスト | |
| ユーザー |
irohasu_takaoka
|
| 提出日時 | 2019-05-03 20:28:23 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 778 bytes |
| コンパイル時間 | 823 ms |
| コンパイル使用メモリ | 71,784 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-12-31 16:09:49 |
| 合計ジャッジ時間 | 1,427 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
#include<cstdio>
#include<iostream>
#include<algorithm>
#include<cmath>
#include<set>
#include<map>
#include<queue>
#include<vector>
typedef long long int ll;
#define REP(i, n) for(int i = 0; i < (n); i++)
#define FOR_IN(i, a, b) for(int i = (a); i < (b); i++)
#define BETWEEN(x, a, b) ((x) >= (a) && (x) <= (b))
#define BIT(b, i) (((b) >> (i)) & 1)
#define LOG_F 1
#define LOG(...) if(LOG_F) fprintf(stderr, __VA_ARGS__)
using namespace std;
ll pow(int x, int n){
return n == 0 ? 1 : x * pow(x, n - 1);
}
void Yn(bool f)
{
cout << (f ? "Yes" : "No") << endl;
}
void yn(bool f)
{
cout << (f ? "yes" : "no") << endl;
}
void YN(bool f)
{
cout << (f ? "YES" : "NO") << endl;
}
int k, n;
int main(){
cin >> n>>k;
cout << pow(2,n)/pow(2,k) << endl;
return 0;
}
irohasu_takaoka