TÍNH TỔNG

View as PDF



Problem types
Allowed languages
Assembly, Awk, Brain****, C, C++, Java, Pascal, Perl, Python, SCRATCH, Sed, Text
Points: 1000 (p) Time limit: 1.0s Memory limit: 1G Input: stdin Output: stdout

Cho tổng \(S = 1^2\) + \(3^2\) + \(5^2\) + ... + \((2n – 1)^2\) với n ∈ N.

Yêu cầu

Tính tổng \(S\).

Dữ liệu vào

GL2.INP gồm số tự nhiên \(N(1 \leq N \leq 1000)\)

Kết quả

GL2.OUT: In kết quả tính được của tổng \(S\).

Ví dụ
Input
5
Output
165

Comments

Most recent
Loading comments...

There are no comments at the moment.