[解题报告]10302 - Summation of Polynomials
2013-02-25 17:59
190 查看
题目大意
题目原文:http://uva.onlinejudge.org/external/103/10302.pdf背景:
其实就是求1到n的立方和输入:
见sample intput输出:
见sample outputSample Input
1
2
3
Sample Output
1
9
36
算法:
水题,直接上代码。代码:
这里附上我的代码,你可以去这里提交你的代码验证你的代码是否正确。View Code
#include<stdio.h> int main(void) { int x; long long y,a; while(scanf("%d",&x)!=EOF) { a=0; for (y=1; y<=x; y++) a+=y*y*y; printf("%lld\n",a); } return 0; }
相关文章推荐
- POJ1060 Modular multiplication of polynomials解题报告 (2011-12-09 20:27:53)
- POJ1060 Modular multiplication of polynomials解题报告 (2011-12-09 20:27:53)
- UVa OJ 10302-Summation of Polynomials
- UVaOJ-10168-Summation of Four Primes 解题报告
- UVa 10302 - Summation of Polynomials
- uva 10302 summation of polynomials
- USACO 2009 Open 干草塔Tower of Hay 解题报告
- PKU 1707 Sum of powers 解题报告
- LeetCode-Power of Two-解题报告
- LeetCode-Lowest Common Ancestor of a Binary Search Tree-解题报告
- LeetCode 19. Remove Nth Node From End of List 解题报告
- who is in front of me 解题报告
- Polya 定理 (附POJ 1286 Necklace of Beads 解题报告)
- hdu 5427 A problem of sorting 解题报告
- 2014百度之星复赛解题报告:The Game of Coins
- 【LeetCode】Sum of Square Numbers 解题报告
- [LeetCode] 452. Minimum Number of Arrows to Burst Balloons 解题报告
- LeetCode解题报告 452. Minimum Number of Arrows to Burst Balloons [medium]
- [解题报告]List of Conquests
- 2014百度之星复赛解题报告:The Game of Coins