HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Beginners > problem:


50579 - Pentagonal Numbers

Guest
• Review clarifications (4)

Volume problems

• 51034 - Area of 3 Shapes
• 51032 - Triangle Property
• 51033 - Sum of the series
• 51027 - Download Percentage
• 51028 - Isosceles Triangles
• 51031 - Convert from Hex to Dec
• 51030 - Number of Right Triangles
• 51007 - Function f(x)
• 50579 - Pentagonal Numbers
• 001. 51153 - A+B.
• 002. 50348 - Area and Perimeter of ...
• 003. 50349 - Area of a Triangle
• 004. 50350 - Fahrenheit to Celsius
• 005. 50797 - Nr of Missing Guests
• 007. 50280 - Division
• 010. 50357 - Convert Euros into Dol...
• 015. 50356 - Hours Passed

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