結果
問題 |
No.887 Collatz
|
ユーザー |
![]() |
提出日時 | 2019-09-20 21:37:36 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 200 bytes |
コンパイル時間 | 373 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 58,880 KB |
最終ジャッジ日時 | 2024-09-14 16:51:22 |
合計ジャッジ時間 | 2,942 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge6 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 26 WA * 2 |
ソースコード
n = int(input()) ans = 0 c = 1000 for k in range(1000000): ans = max(ans,n) if n == 1: c = min(c,k) if n%2 == 0: n //= 2 else: n = 3*n + 1 print(c) print(ans)