UVA - 10790 How Many Points of Intersection?
2014-10-06 15:54
337 查看
题目大意:求上面的点和下面的点的连线的交点有多少个
解题思路:纯数学题,推出公式a*(a-1)*b*(b-1)/4
解题思路:纯数学题,推出公式a*(a-1)*b*(b-1)/4
#include<cstdio> int main() { long long num1, num2; int mark = 1; while(scanf("%lld %lld", &num1, &num2) != EOF){ if(num1 == 0 && num2 == 0) break; printf("Case %d: ", mark++); long long count = 0; printf("%lld\n",num1*(num1 - 1)*num2*(num2 - 1)/4); } return 0; }
相关文章推荐
- 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?
- UVa:10790 - How Many Points of Intersection?
- 8 UVA 10790 How Many Points of Intersection?
- UVA - 10790 How Many Points of Intersection?