HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Beginners > problem:


50579 - Pentagonal Numbers

Guest
• Review clarifications (4)

Volume problems

• 060. 50583 - Max of 3 numbers
• 065. 50436 - Pocket Money
• 070. 50439 - Telephone Calls
• 080. 50478 - Letter Grades
• 090. 50422 - Area and Perimeter of...
• 222. 50302 - Paper Scissors Rock
• 50310 - Kinetic Energy
• 50314 - Falling Distance
• 50579 - Pentagonal Numbers
• 050. 50568 - Body Mass Index Calc...

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