結果
問題 | No.642 Two Operations No.1 |
ユーザー |
|
提出日時 | 2018-03-28 22:37:01 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 306 bytes |
コンパイル時間 | 557 ms |
コンパイル使用メモリ | 61,976 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-25 13:21:29 |
合計ジャッジ時間 | 1,188 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 WA * 9 |
ソースコード
#include <math.h> #include <iostream> using namespace std; typedef long long LL; int main(int argc, char* argv[]) { LL N; cin>>N; if (N==1){ cout<<0<<endl; return 0; } LL n=N; if (n%2==1){ n++; } double aw=log2((double)n); int Aw=(int)aw; if (N<n){ Aw++; } cout<<Aw<<endl; return 0; }