接下来M行,每行输入7个以空格分隔的非负整数,表示该同学每个旅游景点去过的次数。
输出
输出M行,每行对应一个旅行等级的字符串。
样例输入 Copy
5
0 0 0 0 0 0 0
1 0 0 0 0 0 3
0 0 0 1 1 0 0
1 0 0 2 0 3 0
1 2 3 4 5 6 7
样例输出 Copy
Typical Otaku
Eye Opener
Eye Opener
Young Traveller
Senior Traveller
[提交][状态]
输出M行,每行对应一个旅行等级的字符串。
样例输入 Copy
5
0 0 0 0 0 0 0
1 0 0 0 0 0 3
0 0 0 1 1 0 0
1 0 0 2 0 3 0
1 2 3 4 5 6 7
样例输出 Copy
Typical Otaku
Eye Opener
Eye Opener
Young Traveller
Senior Traveller
[提交][状态]
供参考:
#include <stdio.h>
#define N 7
int main()
{
int i, j, n, m, sum;
scanf("%d", &n);
for (i = 0; i < n; i++) {
for (j = 0, sum = 0; j < N; j++) {
scanf("%d", &m);
if (m != 0) sum++;
}
switch (sum) {
case 0: printf("Typical Otaku"); break;
case 1:
case 2: printf("Eye Opener"); break;
case 3:
case 4: printf("Young Traveller");break;
case 5:
case 6: printf("Excellent Traveller"); break;
case 7: printf("Senior Traveller"); break;
default: break;
}
if (i < n - 1) printf("\n");
}
return 0;
}