結果
問題 | No.642 Two Operations No.1 |
ユーザー |
|
提出日時 | 2018-03-28 22:31:40 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 317 bytes |
コンパイル時間 | 801 ms |
コンパイル使用メモリ | 67,856 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-25 13:21:04 |
合計ジャッジ時間 | 1,539 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 WA * 10 |
ソースコード
#include <iostream> #include <math.h> using namespace std; typedef long long LL; int main(int argc, char* argv[]) { LL N; cin>>N; if (N==1){ cout<<1<<endl; return 0; } LL n=N; if (n%2==1){ n++; } double aw=log10((double)n)/log10(2.0); int Aw=(int)aw; if (N<n){ Aw++; } cout<<Aw<<endl; return 0; }