Skip to content

Instantly share code, notes, and snippets.

@rciovati
Created September 13, 2014 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rciovati/eadfc1a1db50629d20d2 to your computer and use it in GitHub Desktop.
Save rciovati/eadfc1a1db50629d20d2 to your computer and use it in GitHub Desktop.
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