in thread “main” java.lang.StringIndexOutOfBoundsException: String index out of range: 22
输入的字符串只有22个,而for循环,循环255次
输入的是字符串,for (int i = 0; i < n.length(); i++)