Skip to content

Commit 5f2e507

Browse files
committed
codeforces: theatre square
1 parent 8c4d813 commit 5f2e507

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

codeforces_day01/Theatre_Square.go

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package main
2+
3+
import (
4+
"bufio"
5+
"fmt"
6+
"math"
7+
"os"
8+
"strconv"
9+
"strings"
10+
)
11+
12+
13+
func main() {
14+
scanner:=bufio.NewScanner(os.Stdin)
15+
// scanner.Split(bufio.ScanWords)
16+
scanner.Scan()
17+
t:=scanner.Text()
18+
19+
line:=strings.Split(t," ")
20+
21+
m,_:=strconv.Atoi(line[0])
22+
n,_:=strconv.Atoi(line[1])
23+
a,_:=strconv.Atoi(line[2])
24+
25+
height:=math.Ceil(float64(m)/float64(a));
26+
width:=math.Ceil(float64(n)/float64(a));
27+
fmt.Println(uint64(height*width))
28+
}

0 commit comments

Comments
 (0)