Skip to content

Instantly share code, notes, and snippets.

@rciovati
Created Sep 13, 2014
Embed
What would you like to do?
Hackerrank.com Sample Go Problem
package main
import (
"fmt"
)
func main() {
times := readInt()
for i := 0; i < times; i++ {
fmt.Println("hello world")
}
}
func readInt() int {
var n int
_, err := fmt.Scanf("%d", &n)
if err != nil {
panic(err)
}
return n
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment