Start: Jul, 05, 2019 08:40:00
2019年度暑期短学期达标测试
End: Jul, 05, 2019 11:40:00
Time elapsed:
Time remaining:

Problem_ID: D
Result: Accepted
Time: 6ms
Memory: 2020kB
Author: CT12810971281
In contest: 1281

#include<cstdio>
#include<iostream>
#include<iomanip>
#include<cmath>
#include<algorithm>
#include<string>
using namespace std;
int main(){
	string a;
	while(cin>>a){
		for(int i=0;i<a.length();i++){
			if(a[i]>='a'&&a[i]<='c'){
				a[i]='2';
			}
			else if(a[i]>='d'&&a[i]<='f'){
				a[i]='3';
			}
			else if(a[i]>='g'&&a[i]<='i'){
				a[i]='4';
			}
			else if(a[i]>='j'&&a[i]<='l'){
				a[i]='5';
			}
			else if(a[i]>='m'&&a[i]<='o'){
				a[i]='6';
			}
			else if(a[i]>='p'&&a[i]<='s'){
				a[i]='7';
			}
			else if(a[i]>='t'&&a[i]<='v'){
				a[i]='8';
			}
			else if(a[i]>='w'&&a[i]<='z'){
				a[i]='9';
			}
			else if(a[i]>='A'&&a[i]<='Y'){
				a[i]=a[i]+33;
			}
			else if(a[i]=='Z'){
				a[i]='a';
			}
		}
		cout<<a<<endl;
	}
    //system("pause");
    return 0;
}