結果
| 問題 | No.642 Two Operations No.1 |
| コンテスト | |
| ユーザー |
makonagix
|
| 提出日時 | 2018-02-16 11:50:45 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 479 bytes |
| 記録 | |
| コンパイル時間 | 569 ms |
| コンパイル使用メモリ | 83,996 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-06 06:34:16 |
| 合計ジャッジ時間 | 1,868 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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