PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#GL0000005. Lát gạch quảng trường (Theatre Square)
HỌC THEO LỘ TRÌNH
1 lộ trìnhBài tập thuộc lộ trình
Mục lục đề ⌄
Đang đọc
Lát gạch quảng trường (Theatre Square)
Theatre Square
Source: Codeforces
Version: Phuoc Hung OJ Extended
Problem Statement
A rectangular square measures meters. Cover it with the minimum number of square flagstones of side , aligned with the sides. Stones cannot be broken, may extend beyond the square, and must not overlap.
Input
One line containing .
Output
Print the minimum number of flagstones.
Subtasks
- Subtask 1 (20 points):
- Subtask 2 (30 points):
- Subtask 3 (50 points):
Examples
Input
6 6 4
Output
4
Explanation
Each dimension needs two stones of side , so the answer is .