fensa08

#VI LAB1/2

Mar 18th, 2019
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. #VI LAB1/2 made by Fensa08
  2. def sovrshen_broj():
  3.     global broj
  4.     li = range(1,broj)
  5.     zbir = 0
  6.         #[  zbir += elem  for elem in li if broj % elem == 0]
  7.     for elem in li:
  8.         if broj % elem == 0:
  9.             zbir += elem
  10.  
  11.     if zbir == broj:
  12.         print("SOVRSHEN")
  13.     else:
  14.         print("NESOVRSHEN")
  15.  
  16. if __name__ == "__main__":
  17.     broj = eval(input())
  18.     sovrshen_broj()
Add Comment
Please, Sign In to add comment