結果

問題 No.642 Two Operations No.1
ユーザー memmemmi
提出日時 2018-11-27 15:18:48
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 30 ms / 2,000 ms
コード長 126 bytes
コンパイル時間 103 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-06-23 16:38:43
合計ジャッジ時間 1,262 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
res=0

while n>1:
    if n%2==1:
        n+=1
        res+=1
    else:
        n=n//2
        res+=1
print(res)
0