编程题:23
import java.util.Scanner;

public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String num = scanner.next();
StringBuilder result = new StringBuilder();
String digits = "abcdefghij";
String[] units = {"", "S", "B", "Q", "W", "S", "B", "Q", "Y"};

    for (int i = 0; i < num.length(); i++) {
        int digit = num.charAt(i) - '0';
        result.append(digits.charAt(digit));
        if (digit != 0) {
            result.append(units[num.length() - 1 - i]);
        }
    }
    
    System.out.println(result);
}

}

posted on 2025-05-12 23:23  Swishy  阅读(6)  评论(0)    收藏  举报