Skip to content

Instantly share code, notes, and snippets.

@gweakliem
Created January 4, 2018 21:03
Show Gist options
  • Save gweakliem/d297115dc8381863cb31c2f2ac85b201 to your computer and use it in GitHub Desktop.
Save gweakliem/d297115dc8381863cb31c2f2ac85b201 to your computer and use it in GitHub Desktop.
Scala shell for typical HackerRank problem
import scala.io
object Solution {
# Handle input of the format <size>\n<num>\n<num>\n...^d
def main(args: Array[String]) {
val n = StdIn.readInt()
val nums = new Array[Int](n)
for (i <- 1 to n) {
nums[i] = StdIn.readInt()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment