Hungry Sequence (找递增数列)

简介: Hungry Sequence (找递增数列)

Iahub and Iahubina went to a date at a luxury restaurant. Everything went fine until paying for the food. Instead of money, the waiter wants Iahub to write a Hungry sequence consisting of n integers.


A sequence a1, a2, ..., an, consisting of n integers, is Hungry if and only if:


  • Its elements are in increasing order. That is an inequality ai < aj holds for any two indices i, j (i < j).
  • For any two indices i and j (i < j), aj must not be divisible by ai.


Iahub is in trouble, so he asks you for help. Find a Hungry sequence with n elements.


Input


The input contains a single integer: n (1 ≤ n ≤ 105).


Output


Output a line that contains n space-separated integers a1 a2, ..., an (1 ≤ ai ≤ 107), representing a possible Hungry sequence. Note, that each ai must not be greater than 10000000 (107) and less than 1.


If there are multiple solutions you can output any one.


Examples


Input


3

Output


2 9 15

Input


5

Output


11 14 20 27 31


听懂了记得给个赞鼓励一下,码字不易,用爱发电。


上ac代码。

f58230e9f063709cf3167704f4efdf14.gif


有事你就q我;QQ2917366383


学习算法

 

#include<iostream>
using namespace std;
int main()
{
  int t;
  cin>>t;
  for(int i=t;i<=2*t-1;i++)
  {
    cout<<i<<' ';
  }
}


相关文章
|
9月前
leetcode-738:单调递增的数字
leetcode-738:单调递增的数字
69 0
|
算法 测试技术 C#
C++二分算法:使数组严格递增
C++二分算法:使数组严格递增
|
4月前
|
算法
674.最长连续递增序列、5. 最长回文子串(2021-11-05)
674.最长连续递增序列、5. 最长回文子串(2021-11-05)
30 0
|
7月前
|
SQL 分布式计算 MaxCompute
SQL 能力问题之生成一个简单的递增数列,例如从0递增到3的整数数列,如何解决
SQL 能力问题之生成一个简单的递增数列,例如从0递增到3的整数数列,如何解决
|
9月前
334.递增的三元子序列
334.递增的三元子序列
42 0
|
9月前
leetcode-674:最长连续递增序列
leetcode-674:最长连续递增序列
60 0
|
人工智能
有序序列中插入一个整数
有序序列中插入一个整数
98 0
|
算法 C++ Python
每日算法系列【LeetCode 926】将字符串翻转到单调递增
每日算法系列【LeetCode 926】将字符串翻转到单调递增
104 0
leetcode 738 单调递增的数字
leetcode 738 单调递增的数字
56 0
leetcode 738 单调递增的数字

热门文章

最新文章