結果

問題 No.642 Two Operations No.1
ユーザー mlihua09
提出日時 2020-09-04 01:45:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 44 ms / 2,000 ms
コード長 118 bytes
コンパイル時間 161 ms
コンパイル使用メモリ 81,792 KB
実行使用メモリ 52,224 KB
最終ジャッジ日時 2024-11-24 10:55:38
合計ジャッジ時間 1,557 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #


N = int(input())
ans = 0
while N > 1:
    if N % 2:
        N += 1
    else:
        N //= 2
    ans += 1
print(ans)
0