結果

問題 No.820 Power of Two
ユーザー bdisheoshepehabdisheoshepeha
提出日時 2019-06-25 16:08:48
言語 C++11
(gcc 11.4.0)
結果
TLE  
実行時間 -
コード長 351 bytes
コンパイル時間 1,252 ms
コンパイル使用メモリ 144,588 KB
実行使用メモリ 8,760 KB
最終ジャッジ日時 2023-09-05 03:46:13
合計ジャッジ時間 4,836 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include<bits/stdc++.h>
#include<algorithm>
#define lint long long int
#define ldouble long double
using namespace std;


int main(){
    lint n,k;
    cin>>n>>k;
    lint ans=0;
    lint hoge=pow(2,n);
    for(int i=1;;i++){
        if(i*pow(2,k)<=hoge&&0<i*pow(2,k))ans++;
        if(i*pow(2,k)>hoge)break;
    }
    cout<<ans<<endl;
    return 0;
}
0