結果
| 問題 | 
                            No.2241 Reach 1
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2023-03-11 08:00:35 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 472 bytes | 
| コンパイル時間 | 311 ms | 
| コンパイル使用メモリ | 82,132 KB | 
| 実行使用メモリ | 55,916 KB | 
| 最終ジャッジ日時 | 2024-09-18 06:11:52 | 
| 合計ジャッジ時間 | 2,832 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 13 WA * 22 | 
ソースコード
#!/usr/bin/env python3
from collections import deque
dpos4 = ((1, 0), (0, 1), (-1, 0), (0, -1))
dpos8 = ((0, -1), (1, -1), (1, 0), (1, 1), (0, 1), (-1, 1), (-1, 0), (-1, -1))
mod1 = 10**9 + 7
mod2 = 998244353
inf = 1 << 60
def main():
    N = int(input())
    ans = 0
    while N > 1:
        ans += 1
        if N % 2 == 0:
            while N % 2 == 0:
                N //= 2
        else:
            N += 1
    print(ans)
if __name__ == "__main__":
    main()