結果

問題 No.820 Power of Two
ユーザー dgd1724dgd1724
提出日時 2019-09-26 07:09:44
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 318 bytes
コンパイル時間 1,030 ms
コンパイル使用メモリ 63,332 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-24 15:08:30
合計ジャッジ時間 1,464 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 WA -
testcase_03 AC 1 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 1 ms
4,348 KB
testcase_06 AC 2 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 2 ms
4,348 KB
testcase_09 AC 2 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <fstream>
#include <iostream>
#include <utility>
#include <string>
#include <cmath>


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 << std::pow(2, N - K) << std::endl;
	}

}
0