URI / BEE CROWD 1142 - PUM - Solution in C,C++,Python | URI - BEECROWD - BEE 1142 Solution in C,C++,Python

URI / BEE CROWD 1142 - PUM - Solution in C,C++,Python | URI - BEECROWD - BEE 1142 Solution in C,C++,Python

                                                                                             beecrowd | 1142

PUM

Adapted by Neilor Tonin, URI  Brazil

                                                                                             Timelimit: 1


URI / BEE CROWD 1142 - PUM - Solution in C,C++,Python | URI - BEECROWD - BEE 1142 Solution in C,C++,Python :

Write a program that reads an integer N. This N is the number of output lines printed by this program.

Input

The input file contains an integer N.

Output

Print the output according to the given example.

Input SampleOutput Sample

7

1 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

N.B: Don't copy paste the code as same. Just try to understand it and try yourself.

  URI / BEE 1142 Solution in C :   

  URI / BEECROWD Online Judge 1142 Solve  in C :                                          

#include<stdio.h>
int main(){

        int N,i;

        scanf("%d", &N);
       
        for(i = 0; i < N*4;){
            printf("%d %d %d PUM\n",(i+1),(i+2),(i+3));
            i+=4;
    }
     return 0;
}

0 Response to URI / BEE CROWD 1142 - PUM - Solution in C,C++,Python | URI - BEECROWD - BEE 1142 Solution in C,C++,Python

Post a Comment