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: 1URI / 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 Sample | Output Sample |
7 | 1 2 3 PUM |
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