UVa:10790 - How Many Points of Intersection?
2015-04-08 13:01
281 查看
数学推导即可。。。(等差数列求和)
刚开始WA了一次,样例过了,但没注意到int型不能隐性转换为long long型(不知道为什么,求解!??!),强制转换后AC
刚开始WA了一次,样例过了,但没注意到int型不能隐性转换为long long型(不知道为什么,求解!??!),强制转换后AC
#include<stdio.h> int main(){ long long sum; int a, b; int t = 1; while(scanf("%d%d", &a, &b) != EOF){ if(!a && !b) break; printf("Case %d: %lld\n", t++, (long long)a * (a - 1) * b * (b - 1) / 4); } return 0; }
相关文章推荐
- UVa 10790 - How Many Points of Intersection?
- UVA - 10790 How Many Points of Intersection?
- UVA 10790 (暑假-数学(3)-A - How Many Points of Intersection?)
- uva 10790 How Many Points of Intersection?(几何规律)
- uva 10790 How Many Points of Intersection?(数学)
- Uva 10790 - How Many Points of Intersection?
- Uva 10790 - How Many Points of Intersection?
- UVa 10790 - How Many Points of Intersection?
- UVA 10790 How Many Points of Intersection?
- UVA - 10790 How Many Points of Intersection?
- UVA 10790 How Many Points of Intersection? 简单数学题
- uva-10790-How Many Points of Intersection?
- UVa 10790 - How Many Points of Intersection?
- uva 10790 - How Many Points of Intersection?
- UVA 10790 How Many Points of Intersection?
- UVA 10790 How Many Points of Intersection?
- UVa 10790 - How Many Points of Intersection?
- uva 10790 - How Many Points of Intersection?
- uva 10790 - How Many Points of Intersection?
- Uva 10790 How Many Points of Intersection?