• 1
    Input and Output Data
    • Tasks
  • 2
    Conditions
    • Tasks
  • 3
    For Loop
    • Tasks
  • 4
    Strings
    • Tasks
  • 5
    While Loop
    • Tasks
  • 6
    Lists
    • Tasks
  • 7
    Two-Dimensional Arrays
    • Tasks
  • 8
    Dictionaries
    • Tasks
  • 9
    Sets
    • Tasks
  • 10
    Functions and Recursion
    • Tasks
  • к

Занятие 10. Functions and recursion

Difficulty level:

Task«The factor of the number»

The company needs to calculate the performance indicator of each employee. Productivity is defined as a work of all numbers from 1 to the number of completed projects inclusive (factorial). You need to create a program that will calculate its performance for each employee and derive the results in an increase in performance values.

Input format

The first line contains the number of N. The following n lines contain the name of the employee and the number of projects performed by him through the gap

Output format

the names of employees and their performance through the colon and gaps sorted by the increase in performance

Example

Input

3
Anna 4
Boris 3
Vera 5

Output

Boris: 6
Anna: 24
Vera: 120

Hint

There will be no clue here, decide for yourself!

main.py
Test 1
Test 2
Test 3
Test 4
Test 5
Test 6
Test 7
Test 8
Test 9
Test 10
Developer’s solution

🎉 Congratulations! 🎉

You did an excellent job with the task! It was a challenging problem, but you found the correct solution. You are one step closer to mastering programming! Keep up the good work, because every stage you pass makes you even stronger.

AD

Advertisement

red-snake blue-snake green-snake

Running your code...

Помощник ИИ

Привет! Я твой помощник по программированию. Задавай любые вопросы по Python, я могу рассказать о функциях, методах, обьяснить то, что тебе не понятно, а так же о текущей задаче!