maoxiantongxue's blog

By maoxiantongxue, history, 5 months ago, In English

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

 
 
 
 
  • Vote: I like it
  • -32
  • Vote: I do not like it

»
5 months ago, # |
  Vote: I like it +21 Vote: I do not like it

bruh