迴圈
輸入數字
迴圈
輸入字串
按期規則輸出
#include<iostream>
using namespace std;
int main()
{
char info[50][20];
int assist, kill, die;
int n;
int kill_t;
while(cin >> n)
{
assist = kill = die = kill_t = 0;
for(int i = 0; i<n; i++)
{
cin >> info[i];
if(info[i][0]!='G')
{
if(kill_t < 3)
cout << "You have been slained." << endl;
else
cout << "SHUTDOWN." << endl;
kill_t = 0;
die++;
}
else if(info[i][4] == 'K')
{
switch(kill_t)
{
case 0: case 1:
cout << "You have slain an enemie." << endl;
break;
case 2:
cout << "KILLING SPREE!" << endl;
break;
case 3:
cout << "RAMPAGE~" << endl;
break;
case 4:
cout << "UNSTOPPABLE!" << endl;
break;
case 5:
cout << "DOMINATING!" << endl;
break;
case 6:
cout << "GUALIKE!" << endl;
break;
default:
cout << "LEGENDARY!" << endl;
break;
}
kill_t ++;
kill ++;
}
else
assist ++;
}
cout << kill<< "/" << die << "/" << assist << endl;
}
return 0;
}
留言列表