We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • Hackerrank Home
  • Prepare
    NEW
  • Certify
  • Compete
  • Career Fair
  • Hiring developers?
  1. Prepare
  2. Functional Programming
  3. Introduction
  4. Hello World N Times

Hello World N Times

Problem
Submissions
Leaderboard
Discussions

Print "Hello World" amount of times. The input portion will be handled automatically. You need to write a function with the recommended method signature.

Input Format

A single line of input containing integer , the number of times to print "Hello World".

Output Format

Output lines, each containing "Hello World".

Constraints

Sample Input

4

Sample Output

Hello World
Hello World
Hello World
Hello World

Recommended Method Signature

Number Of Parameters: 1
Parameters: [n]
Returns: nil

For Hackers Using Clojure

This will be the outline of your function body (fill up the blank portion marked by underscores):

 (fn[n]___________________________)

For Hackers Using Scala

This will be the outline of your function body (fill up the blank portion marked by underscores):

 def f(n: Int) = ______________________

For Hackers Using Haskell

This will be the outline of your function body (fill up the blank portion marked by underscores):

 hello_worlds n = ______________________

For Hackers Using other Languages

You have to read input from standard input and write output to standard output. Please follow the input/output format mentioned above.

NOTE: You only need to submit the code above, after filling in the blanks appropriately. The input and output section will be handled by us. The focus is on writing the correct function.

Author

idlecool

Difficulty

Easy

Max Score

5

Submitted By

45368

Need Help?


View discussions
View top submissions

rate this challenge

MORE DETAILS

Download problem statement
Download sample test cases
Suggest Edits
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy
  • Request a Feature