結果
問題 |
No.642 Two Operations No.1
|
ユーザー |
![]() |
提出日時 | 2018-02-16 11:55:41 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 485 bytes |
コンパイル時間 | 730 ms |
コンパイル使用メモリ | 65,552 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2025-01-02 19:42:02 |
合計ジャッジ時間 | 1,508 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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(){ long long n,x; cin>>n; x=1; int ans=0; while(x<n){ x*=2; ans++; } ans+=x-n; cout<<ans<<endl; return 0; }