• 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
  • к

Занятие 8. Dictionary

Difficulty level:

Task«Cryptographic dictionary»

You work in the company's IT department and should analyze the profitability of the purchase of various gadgets. Each gadget has the initial cost, monthly utility and degradation coefficient. Usefulness is reduced every month by the interest coefficient of interest. It is necessary to determine the overall usefulness of each gadget for the specified period and find the most profitable.

Input format

The first line contains the number of months of analysis. The second line contains the number of gadgets. Further for each gadget: name, initial cost, initial utility, degradation coefficient as a percentage

Output format

for each gadget: name, final usefulness for the period, the ratio of usefulness/cost. At the end, the name of the most profitable gadget

Example

Input

6
3
Laptop 50,000 1000 5
Tablet 20,000 600 8
Phone 30,000 800 10

Output

laptop: 5298.16 0.11
Tablet: 2952.34 0.15
Phone: 3748.47 0.12
The most profitable: Tablet

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, я могу рассказать о функциях, методах, обьяснить то, что тебе не понятно, а так же о текущей задаче!