shunfurh
编程介的小学生
2019-03-13 15:02

一个多项是的公式的计算问题,运用C语言编程技术的实现的方式是

  • Golang
  • r语言
  • erlang

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

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

0条回答