Cf div2 191 B

Source: Internet
Author: User
B. Hungry Sequencetime limit per test

1 second

Memory limit per test

256 megabytes

Input

Standard input

Output

Standard output

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 consistingNIntegers.

A sequenceA1,A2,
...,AN, Consisting
OfNIntegers, is Hungry if and only if:

  • Its elements are in increasing order. That is an inequalityAILatency <latencyAJHolds
    For any two indicesI, Bytes,J(ILatency <latencyJ).
  • For any two indicesIAndJ(ILatency <latencyJ),AJMust not be
    DivisibleAI.

Iahub is in trouble, so he asks you for help. Find a Hungry sequenceNElements.

Input

The input contains a single integer:N(1 digit ≤ DigitNLimit ≤ limit 105 ).

Output

Output a line that containsNSpace-separated integersA1A2,
...,AN(1 digit ≤ DigitAILimit ≤ limit 107 ),
Representing a possible Hungry sequence. Note, that eachAIMust
Not be greater than 10000000 (107)
And less than 1.

If there are multiple solutions you can output any one.

Sample test (s) input
3
Output
2 9 15
Input
5
Output
11 14 20 27 31
 
First, I will post a question about the quality of cf water. The following is the code:
 
#include <cstdio>#include <cstring>#include <iostream>#include <algorithm>using namespace std;long long a[100000];int main(){    int n;    while(scanf("%d",&n)!=EOF){          int count=1;          int i=n+1;          while(1){               a[count]=i;               i++;               count++;               if(count==n+1)                 break;          }          for(int j=1;j<=n;j++)              printf("%lld ",a[j]);          printf("\n");    }}
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.