[恢]hdu 2524

2011-12-14 05:20:24

地址:http://acm.hdu.edu.cn/showproblem.php?pid=2524

题意:中文。

mark:有意思。2个维度分开考虑,结果相乘,用到求和公式,没超过int范围。

代码:

# include <stdio.h>


int main ()
{
int n, m ;
scanf ("%d", &n) ;
while (~scanf ("%d%d", &n, &m))
printf ("%d\n", n*(n+1)*m*(m+1)/4) ;

return 0 ;
}



原文地址:https://www.cnblogs.com/lzsz1212/p/2314543.html