結果
| 問題 |
No.2610 Decreasing LCMs
|
| コンテスト | |
| ユーザー |
gew1fw
|
| 提出日時 | 2025-06-12 13:11:06 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 512 bytes |
| コンパイル時間 | 489 ms |
| コンパイル使用メモリ | 82,648 KB |
| 実行使用メモリ | 54,092 KB |
| 最終ジャッジ日時 | 2025-06-12 13:13:48 |
| 合計ジャッジ時間 | 4,890 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | WA * 22 |
ソースコード
n = int(input())
if n == 3:
print("21 24 144")
else:
# For N > 3, we can extend the sequence by adding multiples of the last element
# that are larger but share factors to reduce the LCM.
# One possible way is to use the pattern 21, 24, 144, 144*7=1008, 1008*7=7056, etc.
# This ensures the sequence is increasing and LCM decreases each time.
a = [21, 24, 144]
current = 144
for _ in range(3, n):
current *= 7
a.append(current)
print(' '.join(map(str, a[:n])))
gew1fw