I'm glad that SPOJ finally supports SWIFT! Thanks for that. Unfortunately I found a little problem. importing most basic Foundation framework causes that judge produces runtime error (NZEC). Example for TEST problem.
This code is OK:
var x = Int(readLine()!)!
while(x != 42) {
print(x)
x = Int(readLine()!)!
}
and this code gives runtime error (NZEC):
`import Foundation
var x = Int(readLine()!)!
while(x != 42) {
print(x)
x = Int(readLine()!)!
}
`
Of course Foundation is not needed to solve TEST problem. But without Foundation i.e. string operations are very painful. Any advices?