HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Contests > Lab10 - CEN ECE > problem:


9-P4. 50899 - How Many Years

Lab10 - CEN ECE

Start: Nov.28.2023 at 12:14:08 AM
Finish: Dec.14.2023 at 11:14:08 PM
The contest is finished!
• Contest scoreboard

Guest
• Review clarifications (3)

Contest problems

• 50463 - Drawing a Triangle
• 50466 - Drawing Square From Stars
• 14-FallResit-10. 50537 - esreveR Tri...
• 14-Spr2-40. 50438 - Pattern with stars
• 15-Fall-01. 50806 - TVSH
• 15-FallHW-1. 50820 - Post Office
• 15-PE-3. 50867 - Average of the Be...
• 2013-04-60. 50295 - Weighted Aver...
• 9-P4. 50899 - How Many Years

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Question by Halil Karimis.

After how many years?

A man invests $A and $B to two different companies. A grows 3% per year. B grows 2% per year.

Write a program to find after how many years A will surpass B.

Input: You will be given 2 positive integers (M and N) and M < N.

Output : Show one integer: the number of years that A will be more than B.

Sample Input1:

Sample Input2:

500 700

1000 2000

Sample  Output1:

Sample  Output2:

35

72

 

Для отправки решений необходимо выполнить вход.

www.contester.ru