結果
| 問題 | 
                            No.642 Two Operations No.1
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2018-03-28 22:33:04 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 317 bytes | 
| コンパイル時間 | 574 ms | 
| コンパイル使用メモリ | 59,628 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-06-25 13:21:22 | 
| 合計ジャッジ時間 | 1,253 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 6 WA * 9 | 
ソースコード
#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<<0<<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;
}