問題一覧 > 通常問題

No.2174 3 O'clock Easy

レベル : / AI推定難易度 : 124 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 77
作問者 : dolp / テスター : jaydolphXX Chicken-iniad yu7400ki
お気に入りにしたユーザー ProblemId : 8966 / 自分の提出
問題文最終更新日: 2022-12-26 22:53:01
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original

Problem Statement

There are $N$ children at Competitive Programming Kindergarten. Teacher dolp has decided to line the children up in a row and give chocolates to them: $1$ chocolate to the first child, $4$ to the second, $27$ to the third..., and so on, giving $3k-2$ chocolates to the $3k-2$-th child, $(3k-1)^2$ chocolates to the $3k-1$-th child, and $(3k)^3$ chocolates to the $3k$-th child.
How many chocolates are needed in total?

Constraints

$1\:{\leq}\:N\:{\leq}\:10^{4} $

$k\:$ is an integer satisfying $\:1\:{\leq}\:k\:{\leq}\:\frac{N}{3}\:$

Input

$N$

Output

Print a newline at the end.

Sample

Sample 1
Input
6
Output
277

The answer is $1^1+2^2+3^3+4^1+5^2+6^3=1+4+27+4+25+216=277$.

Sample 2
Input
20
Output
13076

Sample 3
Input
2022
Output
1398031550101

That is a lot of chocolate.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。