I have been trying to solve the Reverse the Number(Flow007) in the beginner section.
I have written a code and tried running in the codechef compiler against the input and it is giving wrong answer, it’s giving correct output when i tried runing it in eclipse
import java.util.Scanner;
class flow007 {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int n = in.nextInt();
while(n-->0){
String num = in.next();
int len = num.length()-1;
for(int i = len;i>=0;i--){
char c = num.charAt(i);
System.out.print(c);
}
System.out.println("");
}
in.close();
}
}