結果

問題 No.887 Collatz
ユーザー Shiro_S
提出日時 2020-03-31 04:00:52
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 150 bytes
コンパイル時間 93 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-06-23 15:15:21
合計ジャッジ時間 1,995 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 22 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

a = int(input())
i, m = 0, 0
while a != 1:
    i += 1
    if a%2:
        a = 3*a + 1
    else:
        a = a // 2
    m = max(a, m)
print(i)
print(m)
0