HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Unsorted > problem:


50899 - How Many Years

Guest
• Review clarifications (3)

Section problems

• 50902 - Translate Score into Grade
• 50938 - Translate Score into Grade
• 50958 - Number of Passengers in Train
• 50890 - Convert Celsius to Fahrenheit
• 50889 - Convert to Minutes and Sec...
• 50952 - Print All Numbers from N d...
• 50900 - Put the Numbers in Descend...
• 50884 - Area and Perimeter Of The ...
• 50899 - How Many Years
• 50610 - Feasibility
• 50612 - Fun game
• 50617 - KBH
• 50618 - Code Correction
• 50620 - Poker
• 50621 - Postal Figures
• 50630 - Radio Station
• 50631 - Robots

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