Advertisement
PlotnikovPhilipp

Untitled

Oct 24th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2. n, k = [int(i) for i in input().split()]
  3. currentAmount = 1
  4. result = 0
  5. while currentAmount < n:
  6.     if currentAmount <= k:
  7.         currentAmount += currentAmount
  8.     elif currentAmount > k:
  9.         currentAmount += k
  10.     result += 1
  11. print(result)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement