結果
| 問題 |
No.642 Two Operations No.1
|
| コンテスト | |
| ユーザー |
makonagix
|
| 提出日時 | 2018-02-16 11:50:45 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 479 bytes |
| コンパイル時間 | 548 ms |
| コンパイル使用メモリ | 64,608 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2025-01-02 19:09:30 |
| 合計ジャッジ時間 | 1,414 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 WA * 9 |
ソースコード
#include<iostream>
#include<math.h>
#include<string>
#include<algorithm>
using namespace std;
#define rep0(n) for(int i=0;i<n;i++)
#define rep(n) for(int i=1;i<=n;i++)
double const pi=3.1415926535;
int const mod=1000000007;
int const inf=2147483647;
int printint(int n){
cout<<n<<endl;
return 0;
}
int prints(string s){
cout<<s<<endl;
return 0;
}
int main(){
int n,x;
cin>>n;
x=1;
int ans=0;
while(x<n){
x*=2;
ans++;
}
ans+=x-n;
cout<<ans<<endl;
return 0;
}
makonagix