Submission #00249


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define inf 1001001001
template<class T> bool chmax(T &a, const T &b) { if(a < b) {a = b; return true;} return false; }
template<class T> bool chmin(T &a, const T &b) { if(b < a) {a = b; return true;} return false; }
//================================================================================================
int main(){
bool judge = true;
long long n, count = 1;
cin >> n;
while(judge){
if(count >= n){
judge = false;
}else{
count *= 2;
}
}
cout << count << endl;
return(0);
}

ステータス

項目 データ
問題 0010 - 無限ビスケット
ユーザー名 ei2212
投稿日時 2024-04-26 16:36:11
言語 C++17
状態 Accepted
得点 10
ソースコード長 646 Byte
最大実行時間 22 ms
最大メモリ使用量 644 KB

セット

セット 得点 Cases
1 ALL 10 / 10 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
in1.txt AC 21 ms 600 KB
1
in2.txt AC 20 ms 572 KB
1
in3.txt AC 16 ms 544 KB
1
in4.txt AC 15 ms 644 KB
1
in5.txt AC 21 ms 620 KB
1
in6.txt AC 20 ms 596 KB
1
inMAX.txt AC 18 ms 564 KB
1
insample1.txt AC 22 ms 532 KB
1
insample2.txt AC 22 ms 504 KB
1
insample3.txt AC 21 ms 476 KB
1