boris-vlasenko

Факториал ли?

Sep 25th, 2015
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.13 KB | None | 0 0
  1. n = int(input('a='))
  2. a = 1
  3. i = 0
  4. while a < n:
  5.     i += 1
  6.     a *= i
  7. if a == n:
  8.     print('yes',i)
  9. else:
  10.     print('no')
Advertisement
Add Comment
Please, Sign In to add comment