Skip to content

Instantly share code, notes, and snippets.

@s4553711
Created April 16, 2014 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save s4553711/10897362 to your computer and use it in GitHub Desktop.
Save s4553711/10897362 to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
int main() {
long long int n;
long long int m;
long long int a;
cin >> n;
cin >> m;
cin >> a;
long long int titles1 = n/a;
long long int titles2 = m/a;
if (n%a != 0) titles1++;
if (m%a != 0) titles2++;
long long int result = titles1*titles2;
cout << result;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment