結果
問題 | No.887 Collatz |
ユーザー |
![]() |
提出日時 | 2021-09-07 09:53:14 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 41 ms / 2,000 ms |
コード長 | 301 bytes |
コンパイル時間 | 448 ms |
コンパイル使用メモリ | 82,016 KB |
実行使用メモリ | 52,088 KB |
最終ジャッジ日時 | 2024-12-23 00:00:49 |
合計ジャッジ時間 | 2,828 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 28 |
ソースコード
A = [int(input())] if A[0] == 1: print(0) else: for i in range(0,400): if A[i] % 2 == 0: if A[i] // 2 == 1: print(i+1) break else: A.append(A[i] // 2) else: A.append(A[i] * 3 + 1) print(max(A))