Nathan Coulas

DMOPC '14 Contest 1 P2 - Tiles

dmopc14c1p2 CPP11 02 May, 2020 0.100s 3 points

Source Code

#include <bits/stdc++.h>
using namespace std;

int main() {
	ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	
	int l, w, t; 
	cin >> l >> w >> t;
	
	if(t > l || t > w){
		cout << 0;
		return 0;
	}
	
	l = floor(l / t);
	w = floor(w / t);
	cout << l * w;
	
	return 0;
}