728x90
2명이상 풀 수 있는 문제 counting해줌
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
public class HelloWorld {
private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
private static BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
public static void main(String[] args) throws IOException {
int T = Integer.parseInt(br.readLine());
int res = 0;
for(int i=0; i<T; i++) {
String input = br.readLine();
int numWhoCanSolve = Character.getNumericValue(input.charAt(0))
+ Character.getNumericValue(input.charAt(2))
+ Character.getNumericValue(input.charAt(4));
if(numWhoCanSolve>=2) res++;
}
bw.write(Integer.toString(res));
bw.flush();
}
}
|
cs |
'알고리즘 풀이 > CodeForces' 카테고리의 다른 글
[CodeForces][JAVA] 118A - String Task (0) | 2021.06.20 |
---|---|
[CodeForces][JAVA] 282A. Bit++ (0) | 2021.06.20 |
[CodeForces][JAVA] 158A.Next Round (0) | 2021.06.20 |
[CodeForces][JAVA] 1A - Theatre Square (0) | 2021.06.08 |
[CodeForces][JAVA] 71A. Way Too Long Words (0) | 2021.06.08 |