結果

問題 No.887 Collatz
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2022-05-07 10:44:37
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 211 bytes
コンパイル時間 291 ms
コンパイル使用メモリ 87,096 KB
実行使用メモリ 76,044 KB
最終ジャッジ日時 2023-09-20 19:42:52
合計ジャッジ時間 5,228 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
75,712 KB
testcase_01 AC 77 ms
75,848 KB
testcase_02 AC 76 ms
75,800 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 79 ms
75,808 KB
testcase_06 AC 81 ms
75,852 KB
testcase_07 AC 81 ms
75,940 KB
testcase_08 AC 84 ms
75,900 KB
testcase_09 AC 81 ms
75,812 KB
testcase_10 AC 77 ms
75,912 KB
testcase_11 AC 78 ms
75,732 KB
testcase_12 AC 79 ms
75,816 KB
testcase_13 AC 77 ms
75,712 KB
testcase_14 AC 79 ms
75,944 KB
testcase_15 AC 79 ms
75,880 KB
testcase_16 AC 78 ms
75,788 KB
testcase_17 AC 78 ms
75,812 KB
testcase_18 AC 79 ms
76,004 KB
testcase_19 AC 78 ms
75,856 KB
testcase_20 AC 78 ms
75,780 KB
testcase_21 AC 77 ms
75,768 KB
testcase_22 AC 76 ms
75,780 KB
testcase_23 AC 78 ms
75,784 KB
testcase_24 AC 76 ms
75,948 KB
testcase_25 AC 77 ms
75,704 KB
testcase_26 AC 77 ms
75,748 KB
testcase_27 AC 79 ms
75,776 KB
testcase_28 AC 79 ms
75,824 KB
testcase_29 AC 76 ms
75,704 KB
testcase_30 AC 77 ms
75,748 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n0 = int(input())
m = n0
first = -1
for i in range(10**5):
    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