您的位置:首页 > 其它

Coderforces Bit++

2017-06-13 08:27 246 查看
http://codeforces.com/problemset/problem/282/A

import java.util.Scanner;

public class Bit {

public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int temp = 0;
for(int i = 0; i <n; i++) {
String string = scanner.next();
if(string.startsWith("+") || string.endsWith("+")) temp++;
else temp--;
}
System.out.println(temp);
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: