solution.java 552 字节
Newer Older
每日一练社区's avatar
每日一练社区 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
import java.util.Arrays;

public class Main {

    public static void main(String[] args) {
        String string = "", string1 = "";
        for (int i = 0; i < 2014; i++) {
            string += (char) ('a' + (i % 19));
        }
        while (string.length() != 1) {
            for (int i = 0; i < string.length(); i++) {
                if (i % 2 == 1) {
                    string1 += string.charAt(i);
                }
            }
            string = string1;
            string1 = "";
        }
        System.out.println(string);
    }

}