Skip to content

Commit 8c4d813

Browse files
committed
codeforces: team
1 parent 6b2fb74 commit 8c4d813

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

codeforces_day01/team.go

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package main
2+
3+
import (
4+
"bufio"
5+
"fmt"
6+
"os"
7+
"strconv"
8+
"strings"
9+
// "strings"
10+
)
11+
12+
13+
func main() {
14+
scanner:=bufio.NewScanner(os.Stdin)
15+
// scanner.Split(bufio.ScanWords)
16+
scanner.Scan()
17+
t,_:=strconv.Atoi(scanner.Text())
18+
count:=0;
19+
for t>0{
20+
scanner.Scan();
21+
22+
line:=strings.Split(scanner.Text(), " ")
23+
24+
if(line[0]=="1" &&line[1]=="1"){
25+
count=count+1;
26+
}else if(line[0]=="1"&&line[2]=="1"){
27+
count=count+1;
28+
}else if(line[1]=="1"&&line[2]=="1"){
29+
count=count+1
30+
}
31+
32+
t--;
33+
}
34+
fmt.Println(count)
35+
}

0 commit comments

Comments
 (0)