結果
問題 |
No.642 Two Operations No.1
|
ユーザー |
![]() |
提出日時 | 2018-02-03 16:27:54 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 241 bytes |
コンパイル時間 | 454 ms |
コンパイル使用メモリ | 59,908 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-11 15:21:21 |
合計ジャッジ時間 | 1,007 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 WA * 9 |
ソースコード
#include <iostream> #include <string> #include <math.h> #include <algorithm> #include <utility> using namespace std; int N, X=1, ans=0; int main(){ cin >> N; while(X<N){ X *= 2; ans++; } ans += X-N; cout << ans << endl; }