結果

問題 No.820 Power of Two
ユーザー Example
提出日時 2019-04-26 21:24:35
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 422 bytes
コンパイル時間 859 ms
コンパイル使用メモリ 83,160 KB
実行使用メモリ 13,644 KB
最終ジャッジ日時 2024-11-25 01:54:13
合計ジャッジ時間 14,775 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6 TLE * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cstdio>
#include <string>
#include <cstdlib>
#include <vector>
#include <algorithm>
#include <functional>
#include <iomanip>
#include <stdlib.h>
#include <math.h>
using namespace std;

int main()
{
	int n, k;
	cin >> n >> k;
	long long d = pow(2, n);
	long long e = pow(2, k);
	long long counter = 0;
	for (int i = 1; i <= d; i++) {
		if (i % e == 0) counter++;
	}
	cout << counter << endl;
}
0