#include #include #include using namespace std; int ans[105][105]; int main() { int t,i,j,n,k,maxm; for(i=1;i<=100;i++) { for(j=1;j<=i;j++) { maxm=0; int k=i/j,r=i%j; maxm=maxm+i*k*j; maxm=maxm+r*(i/j)*j; ans[i][j]=maxm; maxm=0; int tmp=i%j; if(tmp>0) { maxm=(i*8-8*tmp)*tmp/2+ans[i-2*tmp][j]; } if(ans[i][j]