結果

問題 No.887 Collatz
ユーザー bellangeldindon
提出日時 2019-10-21 15:29:59
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 199 bytes
コンパイル時間 159 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 52,352 KB
最終ジャッジ日時 2024-07-02 17:42:24
合計ジャッジ時間 2,101 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
max = N
now = N
x = 0
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)
0