結果
問題 |
No.47 ポケットを叩くとビスケットが2倍
|
ユーザー |
|
提出日時 | 2019-03-15 11:05:12 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 460 bytes |
コンパイル時間 | 579 ms |
コンパイル使用メモリ | 59,384 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-28 16:56:14 |
合計ジャッジ時間 | 1,343 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #define REP(i, n) for(int i = 0; i < (int)(n); i++) #define print(x) cout << x << endl; using namespace std; const int MOD = (int)1e9 + 7; int main(void){ cin.tie(0); ios::sync_with_stdio(false); int N; cin >> N; int ans = 0; int n = 1; REP(i, n){ n *= 2; ans += 1; if(n >= N){break;} } if(N==1){ans=0;} print(ans); return 0; }