#include<bits/stdc++.h>
#define ll long long
#define IOS ios::sync_with_stdio(0); cin.tie(0);cout.tie(0);
using namespace std;
int n = 5010;
int m = 5010;
ll sumz,sumc;
int main(){
IOS;
cin >> n >> m;
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
if(i == j){
sumz += (n-i)*(m-j);
}
else{
sumc += (n-i)*(m-j);
}
}
}
cout << sumz << " " << sumc << endl;
return 0;
}
P2241 统计方形(数据加强版)
于 2023-05-03 16:37:50 首次发布