zhukov000

05

Jun 24th, 2021
508
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def F(n):
  2.   bn = bin(n)[2:]
  3.   if n % 2 == 0:
  4.     bn = "1" + bn + "0"
  5.   else:
  6.     bn = "11" + bn + "11"
  7.   return int(bn, 2)
  8.  
  9. mn = 100000
  10. for n in range(1, 1000):
  11.   r = F(n)
  12.   if r > 52:
  13.     mn = min(mn, r)
  14. print(mn)
RAW Paste Data