题解蒟蒻的题解//第一次发布题解 如若有不对之处 欢迎大佬指出 public static void main(String[] args) { Scanner sc = new Scanner(System.in); //把字符串切割成字符 String str = sc.next(); c…