Created
January 4, 2018 21:03
-
-
Save gweakliem/d297115dc8381863cb31c2f2ac85b201 to your computer and use it in GitHub Desktop.
Scala shell for typical HackerRank problem
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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