现在,你的程序要读入一个信号报告的数字,然后输出对应的含义。如读到59,则输出:Extremely strong signals, perfectly readable.

2.2 信号报告(5分)

2.2.1 题目内容:

  • 无线电台的RS制信号报告是由三两个部分组成的:

    • R(Readability) 信号可辨度即清晰度.
    • S(Strength) 信号强度即大小.
  • 其中R位于报告第一位,共分5级,用1—5数字表示.

    1. Unreadable
    2. Barely readable, occasional words distinguishable
    3. Readable with considerable difficulty
    4. Readable with practically no difficulty
    5. Perfectly readable
  • 报告第二位是S,共分九个级别,用1—9中的一位数字表示

    1. Faint signals, barely perceptible
    2. Very weak signals
    3. Weak signals
    4. Fair signals
    5. Fairly good signals
    6. Good signals
    7. Moderately strong signals
    8. Strong signals
    9. Extremely strong signals

现在,你的程序要读入一个信号报告的数字,然后输出对应的含义。如读到59,则输出:Extremely strong signals, perfectly readable.

3.2.2 输入格式:
一个整数,信号报告。整数的十位部分表示可辨度,个位部分表示强度。输入的整数范围是[11,59]中的个位不为0的数字,这个范围外的数字不可能出现在测试数据中。

3.2.3 输出格式:
一句话,表示这个信号报告的意义。按照题目中的文字,先输出表示强度的文字,跟上逗号和空格,然后是表示可辨度的文字,跟上句号。注意可辨度的句子的第一个字母是小写的。注意这里的标点符号都是英文的。

3.2.4 输入样例:
33

3.2.5 输出样例:
Weak signals, readable with considerable difficulty.

3.2.6 时间限制: 500ms 内存限制: 32000kb

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
# python 实现
Rdict = {
'1': 'unreadable',
'2': 'barely readable, occasional words distinguishable',
'3': 'readable with considerable difficulty',
'4': 'readable with practically no difficulty',
'5': 'perfectly readable'
}
Sdict = {
'1': 'Faint signals, barely perceptible',
'2': 'Very weak signals',
'3': 'Weak signals',
'4': 'Fair signals',
'5': 'Fairly good signals',
'6': 'Good signals',
'7': 'Moderately strong signals',
'8': 'Strong signals',
'9': 'Extremely strong signals'
}

RS = input()
R_Code = RS[0]
S_Code = RS[1]
Readability = Rdict[R_Code]
Strength = Sdict[S_Code]

print(Strength + ', ' + Readability + '.')

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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
#include<stdio.h>
#include <string.h>

int main(){
int R;
int S;
int RS;

char R1[] = "unreadable";
char R2[] = "barely readable, occasional words distinguishable";
char R3[] = "readable with considerable difficulty";
char R4[] = "readable with practically no difficulty";
char R5[] = "perfectly readable";

char S1[] = "Faint signals, barely perceptible";
char S2[] = "Very weak signals";
char S3[] = "Weak signals";
char S4[] = "Fair signals";
char S5[] = "Fairly good signals";
char S6[] = "Good signals";
char S7[] = "Moderately strong signals";
char S8[] = "Strong signals";
char S9[] = "Extremely strong signals";

char sR[100];
char sS[100];

scanf("%d",&RS);

R = RS / 10;
S = RS % 10;

switch (R) {
case 1:
strcpy(sR, R1);
switch (S) {
case 1:
strcpy(sS, S1);
break;
case 2:
strcpy(sS, S2);
break;
case 3:
strcpy(sS, S3);
break;
case 4:
strcpy(sS, S4);
break;
case 5:
strcpy(sS, S5);
break;
case 6:
strcpy(sS, S6);
break;
case 7:
strcpy(sS, S7);
break;
case 8:
strcpy(sS, S8);
break;
case 9:
strcpy(sS, S9);
break;
}
break;
case 2:
strcpy(sR, R2);
switch (S) {
case 1:
strcpy(sS, S1);
break;
case 2:
strcpy(sS, S2);
break;
case 3:
strcpy(sS, S3);
break;
case 4:
strcpy(sS, S4);
break;
case 5:
strcpy(sS, S5);
break;
case 6:
strcpy(sS, S6);
break;
case 7:
strcpy(sS, S7);
break;
case 8:
strcpy(sS, S8);
break;
case 9:
strcpy(sS, S9);
break;
}
break;
case 3:
strcpy(sR, R3);
switch (S) {
case 1:
strcpy(sS, S1);
break;
case 2:
strcpy(sS, S2);
break;
case 3:
strcpy(sS, S3);
break;
case 4:
strcpy(sS, S4);
break;
case 5:
strcpy(sS, S5);
break;
case 6:
strcpy(sS, S6);
break;
case 7:
strcpy(sS, S7);
break;
case 8:
strcpy(sS, S8);
break;
case 9:
strcpy(sS, S9);
break;
}
break;
case 4:
strcpy(sR, R4);
switch (S) {
case 1:
strcpy(sS, S1);
break;
case 2:
strcpy(sS, S2);
break;
case 3:
strcpy(sS, S3);
break;
case 4:
strcpy(sS, S4);
break;
case 5:
strcpy(sS, S5);
break;
case 6:
strcpy(sS, S6);
break;
case 7:
strcpy(sS, S7);
break;
case 8:
strcpy(sS, S8);
break;
case 9:
strcpy(sS, S9);
break;
}
break;
case 5:
strcpy(sR, R5);
switch (S) {
case 1:
strcpy(sS, S1);
break;
case 2:
strcpy(sS, S2);
break;
case 3:
strcpy(sS, S3);
break;
case 4:
strcpy(sS, S4);
break;
case 5:
strcpy(sS, S5);
break;
case 6:
strcpy(sS, S6);
break;
case 7:
strcpy(sS, S7);
break;
case 8:
strcpy(sS, S8);
break;
case 9:
strcpy(sS, S9);
break;
}
break;
}

printf("%s, %s.", sS, sR);

return 0;
}