結果
| 問題 | No.820 Power of Two |
| コンテスト | |
| ユーザー |
dgd1724
|
| 提出日時 | 2019-09-26 21:21:21 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 392µs | |
| コード長 | 349 bytes |
| 記録 | |
| コンパイル時間 | 319 ms |
| コンパイル使用メモリ | 78,720 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2026-09-03 02:34:00 |
| 合計ジャッジ時間 | 1,522 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
#include <fstream>
#include <iostream>
#include <utility> //pair
#include <string>
#include <cmath> //pow
int main() {
//std::ifstream inf("Text.txt"); std::cin.rdbuf(inf.rdbuf());
int N, K;
std::cin >> N >> K;
if (N - K < 0) {
std::cout << 0 << std::endl;
}
else {
std::cout << static_cast<int>(std::pow(2, N - K)) << std::endl;
}
}
dgd1724