請問這是哪裡錯了,不管怎麼測試都有正確的找出翻轉後的最大值
package c561;
import java.util.*;
public class c561 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
int a = sc.nextInt();
String b[] = new String[a];
int o[] = new int [a];
StringBuffer c = new StringBuffer();
for(int i = 0; i < a; i++){
b[i] = sc.next();
}
for(int j = 0; j < b.length; j++) {
String d = b[j];
c = new StringBuffer(d);
c.reverse();
String str = c.toString();
int e = Integer.parseInt(str);
o[j] = e;
}
for(int k = 0; k < o.length-1; k++) {
if(o[k+1] > o[k]){
o[0] = o[k+1];
}
else {
o[0] = o[0];
}
}
System.out.println(o[0]);
}
}
}