TÍNH TỔNG

View as PDF

Points: 5 (p) Time limit: 1.0s Memory limit: 1G Input: gl2.inp Output: gl2.out

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
Kết quả: tệp GL2.OUT: In kết quả tính được của tổng S.

Ví dụ:
Input
5
Output
165

Comments

There are no comments at the moment.