結果

問題 No.887 Collatz
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2022-05-07 10:45:26
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 211 bytes
コンパイル時間 394 ms
コンパイル使用メモリ 86,916 KB
実行使用メモリ 76,048 KB
最終ジャッジ日時 2023-09-20 19:43:44
合計ジャッジ時間 5,015 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
76,012 KB
testcase_01 AC 83 ms
75,692 KB
testcase_02 AC 81 ms
75,728 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 82 ms
75,764 KB
testcase_06 AC 82 ms
75,800 KB
testcase_07 AC 82 ms
75,684 KB
testcase_08 AC 81 ms
75,788 KB
testcase_09 AC 81 ms
75,812 KB
testcase_10 AC 80 ms
75,932 KB
testcase_11 AC 82 ms
75,796 KB
testcase_12 AC 82 ms
75,732 KB
testcase_13 AC 81 ms
75,624 KB
testcase_14 AC 82 ms
75,780 KB
testcase_15 AC 80 ms
75,836 KB
testcase_16 AC 82 ms
75,792 KB
testcase_17 AC 83 ms
75,876 KB
testcase_18 AC 81 ms
75,868 KB
testcase_19 AC 79 ms
75,692 KB
testcase_20 AC 81 ms
75,756 KB
testcase_21 AC 80 ms
75,792 KB
testcase_22 AC 80 ms
75,716 KB
testcase_23 AC 81 ms
75,720 KB
testcase_24 AC 80 ms
75,860 KB
testcase_25 AC 81 ms
75,916 KB
testcase_26 AC 82 ms
75,728 KB
testcase_27 AC 81 ms
75,752 KB
testcase_28 AC 80 ms
75,676 KB
testcase_29 AC 81 ms
75,732 KB
testcase_30 AC 81 ms
75,748 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n0 = int(input())
m = n0
first = -1
for i in range(10**6):
    if n0 == 1 and first == -1:
        first = i
    if n0%2:
        n0 = n0*3+1
    else:
        n0 =  n0//2
    m = max(m,n0)
print(first)
print(m)
0