hdu 4627 The Unsolvable Problem
2013-07-30 18:12
375 查看
A水题,渐渐发现没有快感了。。
求最小公倍数。
View Code
求最小公倍数。
#include<stdio.h> #define LL __int64 int main() { int T; LL n,s; scanf("%d",&T); while(T--) { scanf("%I64d",&n); if(n==2){ printf("1\n"); continue; } if(n%2){ printf("%I64d\n",(n/2)*(n/2+1)); continue ; }else { s=n/2; if(s%2){ printf("%I64d\n",(s-2)*(s+2)); continue; }else { printf("%I64d\n",(s-1)*(s+1)); continue; } } } return 0; }
View Code
相关文章推荐
- hdu - 4627 - The Unsolvable Problem
- HDU 4627 The Unsolvable Problem(简单题)
- 2013多校联合3 G The Unsolvable Problem(hdu 4627)
- hdu 4627 The Unsolvable Problem
- 2013多校联合3 G The Unsolvable Problem(hdu 4627)
- hdu 4627 The Unsolvable Problem
- HDU 4627 There are many unsolvable problem in the world.It could be about one or about zero.But this time it is about bigger number.
- hdu 4627 The Unsolvable Problem (数论)
- hdu 4627 The Unsolvable Problem
- HDU 4627 The Unsolvable Problem
- HDU 4027 The Unsolvable Problem
- HDU 4267 The Unsolvable Problem
- HDU 4627 The Unsolvable Problem 杭电多校联赛第三场1009 数学题
- HDU 4627 The Unsolvable Problem 2013 Multi-University Training Contest 3
- hdu 4627 The Unsolvable Problem 多校第三场
- HDU-4627-The Unsolvable Problem
- hdu 4627 The Unsolvable Problem(暴力的搜索)
- 2013 Multi-University Training Contest 3 (g) The Unsolvable Problem
- The Unsolvable Problem
- 2013 Multi-University Training Contest 3 (g) The Unsolvable Problem