A special site for solving fun programming problems and challenges, interested in computer science, programming, basics, data structure and algorithms

 codeforces: problem pum soultion in c++.

V. PUM
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output


Given a number N. Print N lines that describes PUM game.

For more clarification see the examples.

Input

Only one line containing a number N (1 ≤ N ≤ 20).

Output

Print the answer according to the required above.


Examples

InputOutput
71 2 3 PUM
5 6 7 PUM
9 10 11 PUM
13 14 15 PUM
17 18 19 PUM
21 22 23 PUM
25 26 27 PUM
31 2 3 PUM
5 6 7 PUM
9 10 11 PUM


soultion:


#include <iostream>
using namespace std;
int main()
{
int num;
cin>>num;
int i=1;
while(num)
{
cout<<i<<" "<<i+1<<" "<<i+2<<" "<<"PUM"<<endl;
i+=4;
num--;
}
return 0;
}




               The End

No comments:

Post a Comment