HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Contests > IMPC - 2013-2014 > problem:


2013-03-10. 50579 - Pentagonal Numbers

IMPC - 2013-2014

Start: Mar.16.2013 at 12:00:00 PM
Finish: Mar.16.2013 at 05:00:00 PM
The contest is finished!
• Contest scoreboard

Guest
• Review clarifications (4)

Contest problems

• 14-05-70. 50477 - Character Pyramids
• 14-05-80. 50372 - Number Quadrup...
• 14-05-90. 50549 - k-Nearest Neigh...
• 14-05-95. 50479 - Bit Compressor
• 14-07-10. 50383 - Noisy Mornings
• 14-07-20. 50384 - Permutations revi...
• 14-07-30. 50385 - The 3n + 1 problem
• 14-07-50. 50367 - Bar Codes
• 2013-03-10. 50579 - Pentagonal...
• 2013-03-20. 50589 - The Number of...
• 2013-03-30. 50559 - Prime Factors ...
• 2013-03-40. 50685 - Guest Room U...
• 2013-04-10. 50335 - Five Math Ope...
• 2013-04-100. 50323 - Filtering Cont...
• 2013-04-30. 50337 - Exam Averages
• 2013-04-40. 50338 - Convert Into ...
• 2013-04-50. 50774 - Hot Potato

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