結果
| 問題 |
No.887 Collatz
|
| コンテスト | |
| ユーザー |
bellangeldindon
|
| 提出日時 | 2019-10-21 15:32:39 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 43 ms / 2,000 ms |
| コード長 | 220 bytes |
| コンパイル時間 | 159 ms |
| コンパイル使用メモリ | 81,920 KB |
| 実行使用メモリ | 52,352 KB |
| 最終ジャッジ日時 | 2024-07-02 17:42:22 |
| 合計ジャッジ時間 | 2,480 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 |
ソースコード
N = int(input()) max = N now = N x = 0 if N != 1: for i in range(1, 401): if now % 2 == 0: now = now // 2 else: now = 3*now + 1 if now == 1: x = i break if max < now: max = now print(x) print(max)
bellangeldindon