大佬,请问我这样对不对啊 public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); String str = in.next(); Solution solution=new Solution(); System.out.println(solution.solu(str)); } public int solu(String str) { if (str.charAt(0) != '1&(30767)#39;) { return -1; } for (int i = 1; i < str.length(); i++) { if (str.charAt(i) != '3&(31257)#39;) { return -1; } } return str.length() - 1; } }