Java gets AC but equivalent Golang solution gets WA

I’ve written nearly equivalent programs (~30 lines of code each). However, the judge only accepts the Java solution.

Java (AC): CodeChef: Practical coding for everyone

Golang (WA): CodeChef: Practical coding for everyone

At this point, I think I must be going crazy. Can anyone spot the difference?