编程题: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);
}
}
浙公网安备 33010602011771号