結果

問題 No.820 Power of Two
ユーザー rarira2010rarira2010
提出日時 2022-08-16 21:03:46
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 283 bytes
コンパイル時間 1,496 ms
コンパイル使用メモリ 164,148 KB
実行使用メモリ 13,764 KB
最終ジャッジ日時 2024-04-14 14:48:05
合計ジャッジ時間 5,091 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main() {
	int n,k;
	std::cin >> n>>k;
	int nk=pow(2,k);
	int count=0;
for (size_t i = 0; i < pow(2,n); i++) {
	if (1<=i&&nk%i==0) {
		count++;
	}
}
std::cout << count << '\n';

}
0