Algorithm


Problem Name: beecrowd | 2581

Problem Link: https://www.beecrowd.com.br/judge/en/problems/view/2581

I am Toorg!

 

By Ricardo Martins, IFSULDEMINAS BR Brazil

Timelimit: 1

Toorg is the wisest member of the group of heroes called The Protectors of the Milky Way. For any question, it has the ideal answer! Write a program that, given a question, tells Toorg's answer.

 

Input

 

The input will have several test cases. For each test case, a N number is displayed, which represents the number of test cases. Then there will be N lines, with questions asked for Toorg.

 

Output

 

For each test case, print Toorg's answer.

 

 

 

Input Sample Output Sample

3
Who are you?
How old are you?
What can I do for you?

I am Toorg!
I am Toorg!
I am Toorg!

 

Code Examples

#1 Code Example with C Programming

Code - C Programming


#include <stdio.h>
#include <stdlib.h>

int main(void)

{
    int i, j, n;
    char str[501], ch;

    scanf("%i", &n);

    for (i = 0; i  <  n; ++i)
    {
        fflush(stdin);
        fgets(str, 501, stdin);

        printf("I am Toorg!\n");
    }

    return 0;
}

Copy The Code & Try With Live Editor

Input

x
+
cmd
3 Who are you? How old are you? What can I do for you?

Output

x
+
cmd
I am Toorg! I am Toorg! I am Toorg!

#2 Code Example with C++ Programming

Code - C++ Programming


#include <iostream>
using namespace std;

int main()
{

    int n;
    cin >> n;
    for(int i = 0; i  <  n ; i++){
        cin.ignore();
        string s;
        getline(cin , s);
        cout << "I am Toorg!\n";
    }
    return 0;
}
Copy The Code & Try With Live Editor

Input

x
+
cmd
3 Who are you? How old are you? What can I do for you?

Output

x
+
cmd
I am Toorg! I am Toorg! I am Toorg!

#3 Code Example with Javascript Programming

Code - Javascript Programming


const { readFileSync } = require("fs")
const [N] = readFileSync("/dev/stdin", "utf8").split("\n")

const DEFAULT_RESP = "I am Toorg!"

for (let i = Number.parseInt(N, 10); i > 0; i--) console.log(DEFAULT_RESP)
Copy The Code & Try With Live Editor

Input

x
+
cmd
3 Who are you? How old are you? What can I do for you?

Output

x
+
cmd
I am Toorg! I am Toorg! I am Toorg!

#4 Code Example with Python Programming

Code - Python Programming


n = int(input())
for i in range(0, n):
    input()
    print("I am Toorg!")
Copy The Code & Try With Live Editor

Input

x
+
cmd
3 Who are you? How old are you? What can I do for you?

Output

x
+
cmd
I am Toorg! I am Toorg! I am Toorg!

#5 Code Example with Java Programming

Code - Java Programming


import java.util.*;
public class Main{
  public static void main(String args[]){
      Scanner sc=new Scanner(System.in);
      while(sc.hasNext()){
         int number;
         number=sc.nextInt();
         sc.next();
         while(number > 0){
           String id1;
           id1=sc.nextLine();
           number--;
           System.out.println("I am Toorg!");
         }
     }
   }
}
      
Copy The Code & Try With Live Editor

Input

x
+
cmd
3 Who are you? How old are you? What can I do for you?

Output

x
+
cmd
I am Toorg! I am Toorg! I am Toorg!
Advertisements

Demonstration


Previous
#2576 Beecrowd Online Judge Solution 2576 Reversing Arrows Solution in C, C++, Java, Js and Python
Next
#2582 Beecrowd Online Judge Solution 2582 System of a Download Solution in C, C++, Java, Js and Python