結果
| 問題 |
No.820 Power of Two
|
| コンテスト | |
| ユーザー |
P₋boy
|
| 提出日時 | 2024-05-10 15:43:08 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 273 bytes |
| コンパイル時間 | 1,752 ms |
| コンパイル使用メモリ | 192,096 KB |
| 最終ジャッジ日時 | 2025-02-21 12:09:08 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main(){
int N, K; cin >> N >> K;
ll twoN = 1, twoK = 1;
for(int i = 0; i < N; ++i) twoN *= 2;
for(int i = 0; i < K; ++i) twoK *= 2;
ll ans = twoN / twoK;
cout << ans << endl;
}
P₋boy