Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2015
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.09 KB | None | 0 0
  1. i = 0
  2. a = 0
  3. while i < 1:
  4.  
  5.     a = int(input())
  6.     S = 0
  7.     D = 0
  8.     pr = a
  9.  
  10.     print('1 условие', a-S*10-D*100)
  11.  
  12.     print('3 условие', a-S*10)
  13.  
  14.     if 99 > a > 20:
  15.         S = a // 10
  16.         a = a-S*10-D*100
  17.     elif (999 > a >= 100) and a % 100 == 0:
  18.         D = a // 100
  19.         a = a-S*10-D*100
  20.     elif (a // 100) >= 2 and (a // 10) >= 12 and (11 <= (pr - ((a // 100) * 100) <= 15)):
  21.         print(a - ((a // 100) * 100))
  22.         D = a // 100
  23.         S = a // 10
  24.         a = 15
  25.     elif (a // 100) > 0 and (a // 10) >= 12:
  26.         print(a - ((a // 100) * 100),'9090909')
  27.         D = a // 100
  28.         S = a // 10
  29.         a = a-S*10
  30.     else:
  31.         D = a // 100
  32.         #S = D - (a // 10)
  33.         a = a-S*10-D*100
  34.  
  35.     if a == 1:
  36.         print(pr, 'программист')
  37.  
  38.     elif ((a % 2 == 0) or (a % 3 == 0) or (a % 4 == 0)) and (a % 5 != 0) and (a % 6 != 0) and (a % 7 != 0) and (a % 8 != 0) and (a % 9 != 0) and (a % 10 != 0):
  39.         print(pr, 'программиста')
  40.  
  41.     else:
  42.         print(pr, 'программистов')
  43.  
  44.     i = i+1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement