結果
| 問題 |
No.820 Power of Two
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-04-26 21:34:13 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 392 ms / 2,000 ms |
| コード長 | 330 bytes |
| コンパイル時間 | 537 ms |
| コンパイル使用メモリ | 64,272 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-25 02:13:35 |
| 合計ジャッジ時間 | 1,434 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
#include <iostream>
using namespace std;
typedef long long LL;
int main(int argc, char* argv[])
{
int N,K;
LL i;
cin>>N>>K;
LL x=1;
for (i=1;i<=K;i++){
x*=2;
}
LL X=1;
for (i=1;i<=N;i++){
X*=2;
}
LL ans=0;
i=1;
while (true){
if (i*x<=X){
ans++;
i++;
}else{
break;
}
}
cout<<ans<<endl;
return 0;
}