# |
Author |
Problem |
Lang |
Verdict |
Time |
Memory |
Sent |
Judged |
|
243221017 |
Practice:
w54mmm |
32C
- 12
|
PyPy 3-64
|
Accepted
|
124 ms
|
8 KB
|
2024-01-25 09:24:27 |
2024-01-25 09:24:27 |
|
def calc(n, s):
return (n % s + 1) * (n // s + 1)
n, m, s = map(int, input().split())
print(calc(n - 1, s) * calc(m - 1, s))
Click to see test details