ttaaa

powers python

Dec 7th, 2021
456
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def powers(n):
  2.     res = set(a**b for a in range(1, n + 1) for b in range(1, n + 1))
  3.     return len(res)
  4.    
  5.    
  6. n = 100
  7. print(powers(n))
RAW Paste Data