結果
| 問題 |
No.887 Collatz
|
| コンテスト | |
| ユーザー |
Nagisa
|
| 提出日時 | 2019-09-20 21:32:01 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 196 bytes |
| コンパイル時間 | 170 ms |
| コンパイル使用メモリ | 81,952 KB |
| 実行使用メモリ | 52,676 KB |
| 最終ジャッジ日時 | 2024-09-14 16:31:08 |
| 合計ジャッジ時間 | 2,455 ms |
|
ジャッジサーバーID (参考情報) |
judge6 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 WA * 2 |
ソースコード
n = int(input())
ans = 0
c = 1000
for k in range(500):
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)
Nagisa