Advertisement
biswasrohit20

fac

Mar 28th, 2021
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. from math import factorial
  2. results = {}
  3.  
  4. n = 1
  5. while True:
  6. if factorial(n) < 4000000:
  7. results[n]=factorial(n)
  8. n += 1
  9. else:
  10. break
  11.  
  12. max_key = max(results)
  13. max_value = results[max_key]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement