import java.util.*; /** * @author zhhy * @date :Created in 2022/1/5 23:07 * @description: * @modified By:2022/1/5 23:07 */ public class Main { public static void main(String[] args){ // new HJ1().method(); // new HJ2().method(); // new HJ3().method(); new HJ4().method(); } } class HJ4{ public void method(){ Scanner scanner = new Scanner(System.in); List<string> list = new ArrayList<>(); while (scanner.hasNext()){ String l = scanner.nextLine(); hh(list,l); } list.forEach(s -> System.out.println(s)); } public void hh(List<string> list, String l){ if(l.length() == 8){ list.add(l); }else if(l.length() < 8){ list.add(bu0(l, 8-l.length())); }else{ list.add(l.substring(0,8)); hh(list,l.substring(8)); } } private String bu0(String l, int n){ StringBuffer sb = new StringBuffer(); sb.append(l); for(int i=0; i</string></string>
点赞

相关推荐

牛客网
牛客网在线编程
牛客网题解
牛客企业服务