結果
問題 |
No.2241 Reach 1
|
ユーザー |
|
提出日時 | 2023-03-10 22:33:06 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 527 bytes |
コンパイル時間 | 2,130 ms |
コンパイル使用メモリ | 191,612 KB |
最終ジャッジ日時 | 2025-02-11 08:44:36 |
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 WA * 22 |
ソースコード
#include <bits/stdc++.h> using namespace std; #ifdef _RUTHEN #include <debug.hpp> #else #define show(...) true #endif using ll = long long; #define rep(i, n) for (int i = 0; i < (n); i++) template <class T> using V = vector<T>; int main() { ios::sync_with_stdio(false); cin.tie(0); long long N; cin >> N; int ans = 0; while (N != 1) { if (N & 1) { N++; } else { while (N % 2 == 0) N /= 2; } ans++; } cout << ans << '\n'; return 0; }