美文网首页编程练习
codeforces 282A (implementation)

codeforces 282A (implementation)

作者: codinRay | 来源:发表于2017-03-31 20:39 被阅读0次

http://codeforces.com/problemset/problem/282/A

生词:

peculiar a.奇怪的
execute vt.处决,使生效

题面:
太水,不想说。

// codeforces
// 282A
// implementation
#include <iostream>
#include <string>
using namespace std;
int main() {
    int n, val = 0;
    cin >> n;
    string s;
    while (n--) {
        cin >> s;
        if (s == "X++" || s == "++X")
            val++;
        else
            val--;
    }
    cout << val;
    return 0;
}

相关文章

网友评论

    本文标题:codeforces 282A (implementation)

    本文链接:https://www.haomeiwen.com/subject/aeavottx.html