HWOJ简单密码破解
作者:
Yuu_CX | 来源:发表于
2017-02-18 19:07 被阅读0次import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner=new Scanner(System.in);
String str=scanner.nextLine();
StringBuffer sb = new StringBuffer();
for(int i=0;i<str.length();i++){
char ch = trans(str.charAt(i));
sb.append(ch);
}
System.out.println(sb);
}
public static char trans(char s) {
if(s>='A'&&s<='Y'){
s+=33;
return s;
}
if(s=='Z'){
s='a';
return s;
}
if(s>='a'&&s<='c'){
s='2';
}else if(s>='d'&&s<='f'){
s='3';
}
else if(s>='g'&&s<='i'){
s='4';
}
else if(s>='j'&&s<='l'){
s='5';
}
else if(s>='m'&&s<='o'){
s='6';
}
else if(s>='p'&&s<='s'){
s='7';
}
else if(s>='t'&&s<='v'){
s='8';
}
else if(s>='w'&&s<='z'){
s='9';
}
return s;
}
}
本文标题:HWOJ简单密码破解
本文链接:https://www.haomeiwen.com/subject/ihhdwttx.html
网友评论