Algorithm
Code Examples
#1 Code Example with C++ Programming
Code -
C++ Programming
#include <cstdio>
int main(){
long n; scanf("%ld",&n);
if(n == 2){puts("-1");}
else{printf("6\n10\n15\n"); for(long p = 3; p < n; p++){printf("%ld\n",6 * p>;}}
return 0;
}
Copy The Code &
Try With Live Editor
Input
3
Output
99
55
11115
55
11115
Demonstration
Codeforces Solution-D. Petya and His Friends-Solution in C, C++, Java, Python