When I run the code for testcase it works fine, however when I submit the solution I get compilation error.
Here is the code
var testCases = Int(readLine()!) ?? 0
while testCases > 0 {
let numsArray = readLine()!._split(separator: " ").flatMap { Int($0) }
if numsArray[0] > numsArray[1] {
print("A")
} else {
print("B")
}
// Decrement testCases
testCases -= 1
}
The problem link is here
https://www.codechef.com/problems/TALLER