solution of 1A

Revision en1, by maoxiantongxue, 2021-01-27 08:41:25

It seems that problem 1A is very easy. But if the types of datum is int, you'll find that your answer can never be accepted, because the types of datum which the system inputs is long long. Here's the code.

#include<>													//the headfile
using namespace std;
int main(){
	int n,m,a;												//define the datum
	cin>>n>>m>>a;											//input the datum
	cout<<(long long)(ceil(n/(double)a)*ceil(m/(double)a));	//output the answer
	return 0;
}

Attention: This code has been changed, please do not Ctrl+C and Ctrl+V. This is also my first blog

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English maoxiantongxue 2021-01-27 08:41:25 611 Initial revision (published)