我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

Calculate the formula

Problem Description
You just need to calculate the sum of the formula: 1^2+3^2+5^2+……+ n ^2.

Input
In each case, there is an odd positive integer n.

Output
Print the sum. Make sure the sum will not exceed 2^31-1

Sample Input
3

Sample Output
10

http://blog.csdn.net/qq_26525215/article/details/51319577

近期文章

  • Michael Scofield's letter
  • Frogger
  • Jackpot
  • asp.net在用SqlHelper没写三层怎么办,只用了mvc EF框架
  • java有什么框架做word跟execl文件生成的框架
  • 关于java String字符串及final的问题
  • 怎么逆向赋值给getElementById("mceu_133")
  • 写入访问权限冲突 显示T是nullptr
  • Java集合类中的ArrayList
  • C#“System.Data.SqlClient.SqlException”类型的未经处理的异常出现
  • python2.7 浮点数格式化输出问题
  • JQuery怎么能获取文本框中用JS方法获取的时间并改变
  • PHP商城 在支付时总是出现“微信支付(必须使用微信内置浏览器),不能付款
  • 发布网站后bootstrap样式无法应用
  • java中大量bean对象操作问题
  • UNIX系统(Solaris)安装oracle11g数据库
  • c和vb for运行结束不一样,帮看一下
  • AVL Tree
  • MagicBuilding
  • 求APP微信第三方登录详细步骤

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华