Maths

시간 제한1초메모리 제한1024 MB

요약
k가 2부터 n까지일 때 각 접두사 합이 정확히 a_k개의 양의 약수를 갖는 수열을 찾는다.
난이도

보통10점 중 4점

유형
수학, 정수론, 그리디, 구현
정답자
아직 제출이 없습니다

문제

Android Vasya attends Maths classes. His group started to study the number theory recently. The teacher gave them several tasks as a homework. One of them is as follows.

There is an integer nn. The problem is to find a sequence of integers a_1,…,a_na\_1, \ldots, a\_n such that for any kk from 2 to nn the sum a_1+…+a_ka\_1 + \ldots + a\_k has exactly a_ka\_k different positive divisors. Help Vasya to cope with this task.

입력

The only line contains an integer nn (2≤n≤100,0002 \leq n \leq 100\\,000).

출력

If there is no such sequence output Impossible. Otherwise output space-separated integers a_1,…,a_na\_1, \ldots, a\_n (1≤a_i≤3001 \leq a\_i \leq 300).

예제1

  1. 예제 1

    입력
    3
    
    예상 출력
    1 3 4