結果
| 問題 |
No.642 Two Operations No.1
|
| コンテスト | |
| ユーザー |
yoshnary
|
| 提出日時 | 2018-02-02 22:55:23 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 354 bytes |
| コンパイル時間 | 796 ms |
| コンパイル使用メモリ | 88,412 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-31 08:02:52 |
| 合計ジャッジ時間 | 1,516 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 WA * 9 |
ソースコード
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <cmath>
#include <queue>
#include <map>
#include <set>
#include <bitset>
#include <functional>
using namespace std;
typedef long long ll;
int main() {
ll n; cin >> n;
int cnt = 0;
ll x = 1;
while (x < n) x *= 2, ++cnt;
cout << cnt + x - n << endl;
return 0;
}
yoshnary