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