Algorithm
Problem Name: beecrowd | 2861
Problem Link: https://www.beecrowd.com.br/judge/en/problems/view/2861
The Output
By Ricardo Martins, IFSULDEMINAS Brazil
Timelimit: 1
Cacunda, Bizz and Massacote are inseparable friends. In college, in a few days, they did not go to class to play tricks. One day a teacher was passing by. At the same time, the three of them shouted the word "gzuz" loudly. After this cry, they became invisible, and the teacher did not see them. Again, their class was answering questions from the teacher. When it was the turn of one of them, they would respond with the word "gzuz", and the teacher would accept the answer and give the maximum mark of the question. Make the simulation of the output they found to get out of the most diverse problems.
Input
The input is composed of several test cases. The first line contains an integer C (2 <= C <= 99) relative to the number of questions the teacher has asked. The following C lines come with a question asked by the teacher.
Output
For each question, print the answer that was said by the three friends.
Input Sample | Output Sample |
3 |
gzuz |
Code Examples
#1 Code Example with C Programming
Code -
C Programming
#include<stdio.h>
#include<string.h>
int main()
{
char s[100];
int i,n;
scanf("%d",&n);
for(i = 1; i < = n; i++)
{
gets(s);
printf("gzuz\n");
}
return 0;
}
Copy The Code &
Try With Live Editor
Input
Output
#2 Code Example with C++ Programming
Code -
C++ Programming
#include <iostream>
#include <string>
using namespace std;
int main()
{
int t;
cin >> t;
string s;
for (int i = 0; i < t; ++i)
{
fflush(stdin);
getline(cin, s);
cout << "gzuz" << endl;
}
return 0;
}
Copy The Code &
Try With Live Editor
Input
Output
#3 Code Example with Javascript Programming
Code -
Javascript Programming
const { readFileSync } = require("fs")
const [numQuestions] = readFileSync("/dev/stdin", "utf8").split("\n")
const output = new Array(Number.parseInt(numQuestions, 10)).fill("gzuz")
console.log(output.join("\n"))
Copy The Code &
Try With Live Editor
Input
Output
#4 Code Example with Python Programming
Code -
Python Programming
n = int(input())
while n > 0:
c = input()
print('gzuz')
n -= 1
Copy The Code &
Try With Live Editor
Input
Output