数学题,要注意精度问题! OJ支持到long long #include <stdio.h> int main() { long n,m; long i,j; long long sum; while (scanf("%ld%ld",&m,&n)!=EOF) { sum = 0; for (i=1;i<=m;i++) for (j=1;j<=n;j++) sum+=((long long)i*(long long)j); printf("%lld/n", sum); } return 0; }