Skip to content

Commit 68c6d63

Browse files
committed
codeforces (div 2 .A)-Rainbow Dash, Fluttershy and Chess Coloring
1 parent 521cf9d commit 68c6d63

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

problem39/main.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// (div 2 .A)-Rainbow Dash, Fluttershy and Chess Coloring
2+
package main
3+
4+
import (
5+
"bufio"
6+
"fmt"
7+
"os"
8+
"strconv"
9+
)
10+
11+
func main() {
12+
scanner:=bufio.NewScanner(os.Stdin)
13+
scanner.Split(bufio.ScanWords)
14+
scanner.Scan()
15+
t,_:=strconv.Atoi(scanner.Text())
16+
17+
for t>0{
18+
scanner.Scan()
19+
n,_:=strconv.Atoi(scanner.Text())
20+
fmt.Println((n/2)+1)
21+
t--
22+
}
23+
}

0 commit comments

Comments
 (0)