### _PsychoKiller's blog

By _PsychoKiller, history, 4 years ago, ,

OK, so i didn't get what the tutorial of that really meant, and that tutorial looked long..-_-

Fortunately, I found a better solution. And my solution is mainly like 2 lines!!! :p I think it's better if you see the code rather than me trying to explain it.....

# include<bits/stdc++.h>

using namespace std;

int main(){ int n, i; cin>>n; for(i=0;i<n;i++)cout<<i+n*10<<" "; return 0; }

For any question or suggestion, feel free!!!

• -14

 » 4 years ago, # |   0 Auto comment: topic has been updated by 1212 (previous revision, new revision, compare).
 » 4 years ago, # |   0 To be very simple You just have to print N Prime Numbers less than 10^7 .
•  » » 4 years ago, # ^ |   0 What if n=10^5? there's isn't 10^5 prime numbers within 10^7....
•  » » » 4 years ago, # ^ |   0 Actually there is.
•  » » » 4 years ago, # ^ |   0 18073266Here you go, test case 5.
 » 4 years ago, # |   0 Do you seriously concatenate every line and believe that you have written only one line of code? :-/
 » 12 months ago, # |   0 A very simple solution would be printing n consecutive numbers starting from 10^5 . The next number divible will be 2*10^5 which is 10^5+1 characters from 10^5 thus stisfying the condition.
•  » » 9 months ago, # ^ | ← Rev. 2 →   0 That is a nice solution