我爱占星网 我爱占星网
首页
编程
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/ac_gibson/article/details/40976603

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

近期文章

  • circumgyrate the string
  • spring mvc 的dispatcherservlet可以不用xml配置吗
  • c++入门级,超市信息管理系统
  • 求Android广播接受者具体的内部执行流程
  • ASP.Net button第一次点击js中的回调函数不执行,第二次点击才执行
  • Android后台运行广播中startActivity,应用总是重庆是个什么鬼
  • SQL Server 2008卸载问题 在线等
  • Spring 配置文件添加<context:component-scan后就无法解析
  • h5 webview文件上传 怎么区分文件选择器?
  • 关于邻接表的插入与删除一个结点
  • Double Queue
  • The Stable Marriage Problem
  • private String time = ""可否改为time=null
  • 问个奇葩的问题,手机版的页面布置,有什么要求吗?
  • ansible 问题
  • C#以下代码块返回的是什么?
  • c++ 文件输入输出流 无法输入 代码如下(真心求急救)
  • 配置spring mvc之后启动tomcat报错
  • fastfds安装问题,一些依赖包都装了
  • java 解压tar.gz文件 怎么获取进度?

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

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

友情链接:代码精华