結果
| 問題 | No.642 Two Operations No.1 |
| コンテスト | |
| ユーザー |
kiwamarinaku
|
| 提出日時 | 2018-05-08 14:43:27 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 239 bytes |
| 記録 | |
| コンパイル時間 | 1,365 ms |
| コンパイル使用メモリ | 172,544 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2026-03-16 12:08:50 |
| 合計ジャッジ時間 | 1,635 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 WA * 9 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n, x = 1, cnt = 0;
scanf("%lld", &n);
while (x < n) {
x *= 2;
cnt++;
}
while (x != n) {
x--;
cnt++;
}
printf("%lld\n", cnt);
return 0;
}
kiwamarinaku