-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path3.4.9_7.cpp
More file actions
40 lines (39 loc) · 990 Bytes
/
3.4.9_7.cpp
File metadata and controls
40 lines (39 loc) · 990 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
#include <iostream>
#include <stdio.h>
#define MAXN 5000
using namespace std;
char a[MAXN];
int main()
{
int i = 0,j = 0,temp = 0;
while(scanf("%c",&a[i]) == 1)
{
for(j = 1;j <= 8;j++){
if((j==1)&&((temp = a[i] - 96) <= 3)&&(a[i]!='\n')){
printf("%c%d",a[i],temp);break;
}
if((j==2)&&((temp = a[i] - 99) <= 3)&&(a[i]!='\n')){
printf("%c%d",a[i],temp);break;
}
if((j==3)&&((temp = a[i] - 102) <= 3)&&(a[i]!='\n')){
printf("%c%d",a[i],temp);break;
}
if((j==4)&&((temp = a[i] - 105) <= 3)&&(a[i]!='\n')){
printf("%c%d",a[i],temp);break;
}
if((j==5)&&((temp = a[i] - 108) <= 3)&&(a[i]!='\n')){
printf("%c%d",a[i],temp);break;
}
if((j==6)&&((temp = a[i] - 111) <= 4)&&(a[i]!='\n')){
printf("%c%d",a[i],temp);break;
}
if((j==7)&&((temp = a[i] - 115) <= 3)&&(a[i]!='\n')){
printf("%c%d",a[i],temp);break;
}
if((j==8)&&((temp = a[i] - 118) <= 4)&&(a[i]!='\n')){
printf("%c%d",a[i],temp);break;
}
}
i++;
}
}