标签:basic-22 fj的字符串 算法 蓝桥杯 java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); while (scanner.hasNext()) { int n = scanner.nextInt(); System.out.println(getAn(n)); } } private static String getAn(int i) { if (i == 1) { return String.valueOf((char) (64 + i)); } return getAn(i - 1) + String.valueOf((char) (64 + i)) + getAn(i - 1); } }
[BASIC-22] FJ的字符串,布布扣,bubuko.com
标签:basic-22 fj的字符串 算法 蓝桥杯 java
原文地址:http://blog.csdn.net/u011506951/article/details/26598383