您的位置:首页 > 其它

hihoCoder 1258 Osu! Master(水)

2015-11-16 15:45 253 查看
题目链接:hihoCoder 1258 Osu! Master

代码

#include <cstdio>
#include <cstring>
#include <algorithm>

using namespace std;

int main () {
int n, c;
char order[5];
while (scanf("%d", &n) == 1) {
int ans = 0;
while (n--) {
scanf("%s", order);
if (order[0] == 'S') ans++;
else {
scanf("%d", &c);
if (c == 1) ans++;
}
}
printf("%d\n", ans);
}
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: