Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 2
- def lcm(a,b):
- m = a*b
- while a != 0 and b != 0:
- if a > b:
- a %= b
- else:
- b %= a
- return m // (a+b)
- # 3
- def fib(n):
- return round(((1 + 5 ** 0.5) / 2)**n / 5 ** 0.5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement