1004. Filled rectangle (Standard IO), 1004io

Source: Internet
Author: User

1004. Filled rectangle (Standard IO), 1004io

The title description shows that the rectangle is n × m, and the rectangle is filled with a × a square. Enter three positive integers n, m, a (n, m, a ≤ 10 ^ 9). How many squares can be filled in? (A square can meet the boundary of a rectangle, but cannot exceed the boundary of a rectangle) Enter three positive integers n, m, and a separated by a space in a row. The number of squares that can be filled in the output. Sample Input
3 4 1
Sample output
12
Data range: 1 <= n, m, a ≤ 10 ^ 9
1 # include <iostream> 2 # include <cstdio> 3 # include <cmath> 4 using namespace std; 5 char B [10001]; 6 int ans; 7 long int; 8 long int n, m; 9 int now = 1; 10 int main () 11 {12 cin >>n> m>; 13 cout <(n/a) * (m/a); 14 return 0; 15}

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.