結果
| 問題 | No.820 Power of Two |
| コンテスト | |
| ユーザー |
Example
|
| 提出日時 | 2019-04-26 21:24:35 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 422 bytes |
| 記録 | |
| コンパイル時間 | 713 ms |
| コンパイル使用メモリ | 98,740 KB |
| 実行使用メモリ | 9,856 KB |
| 最終ジャッジ日時 | 2026-05-19 08:38:14 |
| 合計ジャッジ時間 | 4,770 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 TLE * 1 -- * 7 |
ソースコード
#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;
}
Example