object Main{
def main(args: Array[String]){
var x = 0
var f = true
while(f){
x = readInt()
if(x != 42)
println(x)
else
f = false
}
}
}
The number of problems that can be solved with Scala is quite limited due to long time needed to start it up. I think the time limit should be at least 2 or 3s.
2015-01-25: Modified slightly as the previously shown code did not compile anymore.
created
last reply
- 4
replies
- 1.9k
views
- 4
users