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: 3ms
Memory: 1120kB
Author: CT12813071281
In contest: 1281

#include<stdio.h>
#include<string.h>

int main() {
	char a[105];
	while(gets(a) != NULL) {
		for(int i=0;i<strlen(a);i++) {
			if('a' <= a[i]  && a[i]<= 'c') {
				a[i] = '2';
			}
			if('d' <= a[i] && a[i]<= 'f') a[i] = '3';
			if('g' <= a[i] && a[i]<= 'i') a[i] = '4';
			if('j' <= a[i] && a[i]<= 'l') a[i] = '5';
			if('m' <= a[i] && a[i]<= 'o') a[i] = '6';
			if('p' <= a[i] && a[i]<= 's') a[i] = '7';
			if('t' <= a[i] && a[i]<= 'v') a[i] = '8';
			if('w' <= a[i] && a[i]<= 'z') a[i] = '9';
            if('A' <= a[i] && a[i] <= 'Y') a[i] = a[i] + 33;
			if(a[i] == 'Z') a[i] = 'a';
			printf("%c",a[i]);
		}
		printf("\n");
	}
	return 0;
}