QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#337980#5038. CityKevin5307WA 1ms3596kbC++23277b2024-02-25 16:43:042024-02-25 16:43:05

Judging History

你现在查看的是最新测评结果

  • [2024-02-25 16:43:05]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3596kb
  • [2024-02-25 16:43:04]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
using ll=long long;
int main()
{
	int n,m;
	cin>>n>>m;
	ll ans=0;
	for(int i=1;i<=n;i++)
		for(int j=1;j<=m;j++)
		{
			int a=min(i-1,n-i),b=min(j-1,m-j);
			ans+=(a+a+1)*(b+b+1)/2;
		}
	cout<<ans<<endl;
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3596kb

input:

1 1

output:

0

result:

ok 1 number(s): "0"

Test #2:

score: -100
Wrong Answer
time: 0ms
memory: 3484kb

input:

2 3

output:

2

result:

wrong answer 1st numbers differ - expected: '14', found: '2'