mirror of
https://github.com/tiennm99/codeforces.git
synced 2026-06-09 10:12:55 +00:00
24 lines
472 B
Java
24 lines
472 B
Java
package com.company;
|
|
|
|
import java.util.Scanner;
|
|
|
|
public class Main {
|
|
|
|
public static void main(String[] args) {
|
|
Scanner sc = new Scanner(System.in);
|
|
long n = sc.nextInt();
|
|
long m = sc.nextInt();
|
|
long a = sc.nextInt();
|
|
long r = n / a, c = m / a;
|
|
if (n % a != 0)
|
|
{
|
|
r++;
|
|
}
|
|
if (m % a != 0)
|
|
{
|
|
c++;
|
|
}
|
|
long s = r * c;
|
|
System.out.println(s);
|
|
}
|
|
} |