結果
| 問題 |
No.887 Collatz
|
| コンテスト | |
| ユーザー |
__2346__
|
| 提出日時 | 2019-10-07 16:57:14 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 316 bytes |
| コンパイル時間 | 78 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-10-13 09:17:23 |
| 合計ジャッジ時間 | 2,059 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 28 |
ソースコード
l = []
a = input()
n = int(a)
l.append(n)
while True:
if n % 2 == 0:
n = n / 2
l.append(n)
continue
elif n % 2 == 1:
if n != 1:
n = 3 * n + 1
l.append(n)
continue
else:
break
i = index(1)
nm = max(l)
print(i)
print(nm)
__2346__