結果

問題 No.820 Power of Two
ユーザー himo
提出日時 2019-09-17 17:27:12
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 524 ms / 2,000 ms
コード長 241 bytes
コンパイル時間 1,229 ms
コンパイル使用メモリ 157,928 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-07 13:17:59
合計ジャッジ時間 2,411 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include "bits/stdc++.h"
using namespace std;

int main(){
int n,k;
cin >> n >>k;
int ans =0;
int che =pow(2,n);    
int z =pow(2,k);
int i=1;
int kaisuu =1;
while(i<=che){
    i = z*kaisuu;
    ans++;
    kaisuu++;
}
cout << ans-1 <<endl;
}
0