Kotlin Support

I have tried submitting solution for https://www.codechef.com/CODX2019/problems/CODX002
My solution https://www.codechef.com/status/CODX002,teratau
is getting RE.
Its working in IntelliJ - all sample cases passes without any error.
Would need help in finding out why it is getting RE.
I have tried further solutions with same result
https://www.codechef.com/viewsolution/24858236
https://www.codechef.com/viewsolution/24858322
https://www.codechef.com/viewsolution/24858322
However this solution is getting WA
https://www.codechef.com/viewsolution/24858380
and this has compiler error, however link to compiler error details page is not working
https://www.codechef.com/viewsolution/24858415

I have been submitting solution at CodeForces with similar approach with out
any error .
Any help in this regard will be highly appreciated.
Thanks