HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Arithmetic > problem:


50579 - Pentagonal Numbers

Guest
• Review clarifications (4)

Section problems

• 50440 - Call Center
• 50353 - Cube of the Largest number
• 50336 - Buying Carpets
• 50295 - Weighted Average
• 50296 - Total Discount Rate
• 50289 - Monthly Allowance
• 50559 - Prime Factors of a Number
• 50568 - Body Mass Index Calculator
• 50579 - Pentagonal Numbers
• 50584 - Total invoice amount
• 50634 - Perfect numbers
• 50635 - Decomposition into terms
• 50652 - Prime Factorization
• 50653 - Long Divide
• 50662 - Prime numbers (2)
• 50684 - Sum of prime numbers fro...
• 50546 - Average Fuel Price

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 4000/7000/7000/7000 ms. Memory limit 65000/65000/65000/65000 Kb.
Question by Arban Uka.

nth Pentagonal Number

Shqip

In mathematics, pentagonal numbers is calculated with the following formula:
    
Thus, the first 10 pentagonal numbers: 1, 5, 12, 22, 35, 51, 70, 92, 117, 145.

Write a program that is going to calculate and show nth pentagonal number.

Input specification
There will be just one number (n) where 1 ≤ n ≤ 35000.

Output specification
Show nth pentagonal number.


  Sample Input I:
   5

  Sample Input II:
   34004

  Sample Output I:
   35

  Sample Output II:
   1734391022


Для отправки решений необходимо выполнить вход.

www.contester.ru