题解 | #简单密码#
简单密码
https://www.nowcoder.com/practice/7960b5038a2142a18e27e4c733855dac
import java.util.Scanner;
// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
String btr = "22233344455566677778889999bcdefghijklmnopqrstuvwxyza0123456789";
String x = in.next();
for(int i = 0 ; i< x.length();i++){
System.out.print(btr.charAt(str.indexOf(x.charAt(i))));
}
}
}
