結果
| 問題 |
No.820 Power of Two
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-04-26 21:25:40 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 2,780 bytes |
| コンパイル時間 | 1,022 ms |
| コンパイル使用メモリ | 101,224 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-25 01:58:35 |
| 合計ジャッジ時間 | 1,315 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
/// Containers Start
#include <algorithm>
#include <bitset>
#include <cstdlib>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
/// C Header Files
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <math.h>
#include <stdio.h>
/// Containers End
using namespace std;
/// Math Start
#define PI acos(-1.0)
#define Pi 3.141592653589793
#define EPS (1e-7)
#define INF (0x3f3f3f3f)
/// Math End
/// Extra Start
#define nn '\n'
#define pb push_back
#define ull unsigned long long
#define ll long long
#define MOD 1000000007
#define sz(a) int((a).size())
#define space " "
#define All(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
/// Extra End
#define rep(i, n) for (int i = 0; i < n; i++)
#define Cini(a) \
int a; \
cin >> a;
#define Cinii(a, b) \
int a, b; \
cin >> a >> b;
#define Ciniii(a, b, c) \
int a, b, c; \
cin >> a >> b >> c;
#define Cins(s) \
string s; \
cin >> s;
#define Cinss(s1, s2) \
string s1, s2; \
cin >> s1 >> s2;
#define Cinc(c) \
char c; \
cin >> c;
/// Functions End
/// Debug Start
#define deb(x) cout << #x << ": " << x << endl
#define deb2(x, y) cout << #x << ": " << x << '\t' << #y << ": " << y << endl;
#define deb3(x, y, z) \
cout << #x << ": " << x << '\t' << #y << ": " << y << '\t' << #z << ": " \
<< z << endl;
/// Debug End
int dx[] = {-1, 0, 1, 0};
int dy[] = {0, -1, 0, 1};
/**>>>>>>>>>>>>>>>>>>> END <<<<<<<<<<<<<<<<<<**/
/// template
signed main(void) {
cin.sync_with_stdio(false);
cin.tie(0);
long long N,K;
cin >> N >> K;
cout << (1<<(max(N-K,0LL))) - ((N-K<0)?1:0) << nn;
return 0;
}