Z4. Số hạng thứ n trong dãy số D


Submit solution

Points: 10
Time limit: 1.0s
Memory limit: 256M

Problem type

Dãy số: 1, 5, 14, 30, 55, 91, ...

Hãy tìm số hạng thứ n trong dãy số trên.

Input:
Một số nguyên dương n (1 ≤ n ≤ 109)

Output:
Số hạng thứ n của dãy.

Input:
3
Output:
14
Input:
5
Output:
55

Comments

There are no comments at the moment.