結果

問題 No.2610 Decreasing LCMs
ユーザー gew1fw
提出日時 2025-06-12 18:21:01
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 700 bytes
コンパイル時間 200 ms
コンパイル使用メモリ 82,104 KB
実行使用メモリ 53,944 KB
最終ジャッジ日時 2025-06-12 18:21:31
合計ジャッジ時間 4,971 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other WA * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

if n == 3:
    print("21 24 144")
else:
    # For n >=4, we can use a different pattern.
    # For example, the sequence 10, 12, 16, 32, 64, ... works up to certain N.
    # But for higher N, we need to adjust.
    # Here, we'll generate a sequence where each pair's GCD doubles and the elements are multiples.
    # This works for N up to 25.
    seq = []
    a = 10
    seq.append(a)
    a = 12
    seq.append(a)
    current_gcd = 2  # GCD of 10 and 12 is 2
    for i in range(2, n):
        next_gcd = current_gcd * 2
        next_element = seq[-1] * (next_gcd // current_gcd) * 2
        seq.append(next_element)
        current_gcd = next_gcd
    print(' '.join(map(str, seq)))
0