Created
April 16, 2014 15:49
-
-
Save s4553711/10897362 to your computer and use it in GitHub Desktop.
CodeForces 1A and tutorial in http://algocoding.wordpress.com/2013/03/09/codeforces-tutorial-1-introduction/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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