-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathCodeJam_probA.cpp
More file actions
50 lines (49 loc) · 936 Bytes
/
CodeJam_probA.cpp
File metadata and controls
50 lines (49 loc) · 936 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include<stdio.h>
#include<cstring>
#include<map>
using namespace std;
int main(){
map<char,char> m;
int t,p=1;
m['a']='y';
m['b']='h';
m['c']='e';
m['d']='s';
m['e']='o';
m['f']='c';
m['g']='v';
m['h']='x';
m['i']='d';
m['j']='u';
m['k']='i';
m['l']='g';
m['m']='l';
m['n']='b';
m['o']='k';
m['p']='r';
m['q']='z';
m['r']='t';
m['s']='n';
m['t']='w';
m['u']='j';
m['v']='p';
m['w']='f';
m['x']='m';
m['y']='a';
m['z']='q';
m[' ']=' ';
char temp[102];
scanf("%d",&t);
while(t--){
getchar();
gets(temp);
int len=strlen(temp);
printf("Case #%d: ",p);
for(int i=0;i<len;i++){
printf("%c",m[temp[i]]);
}
printf("\n");
p++;
}
return 0;
}