Advertisement
Guest User

Untitled

a guest
Jan 21st, 2020
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.43 KB | None | 0 0
  1. # Задача по вычислению минимума из первого домащнего заданияы.
  2. a = float(input())
  3. b = float(input())
  4. c = float(input())
  5. d = float(input())
  6. e = float(input())
  7.  
  8. if a <= b and a <= c and a <= d and a <= e:
  9.     min = a
  10. if a >= b and b <= c and b <= d and b <= e:
  11.     min = b
  12. if a >= c and b < c and c <= d and c <= e:
  13.     min = c
  14. if a >= d and b >= d and c >= d and d <= e:
  15.     min = d
  16. if a >= e and b >= e and c >= e and d >= e:
  17.     min = e
  18. print(min)
  19.  
  20. # Гипотенуза
  21. a = float(input())
  22. b = float(input())
  23. c = (a ** 2 + b ** 2) ** 0.5
  24. print(c)
  25.  
  26. # Делёж яблок
  27. n = int(input())
  28. k = int(input())
  29. c = (k // n)
  30. print(c)
  31.  
  32. # Делёж яблок 2
  33. n = int(input())
  34. k = int(input())
  35. c = (k % n)
  36. print(c)
  37.  
  38. # МКАД
  39. a = int(input())
  40. b = int(input())
  41. print((a * b) % 109)
  42.  
  43. # Максимум из двух чисел
  44. a = int(input())
  45. b = int(input())
  46. if a > b:
  47.     print(a)
  48. else:
  49.     print(b)
  50.  
  51. # Високосный год
  52. x = int(input())
  53. if x % 4 == 0 and x % 100 > 0:
  54.     print('YES')
  55. elif x % 400 == 0:
  56.     print('YES')
  57. else:
  58.     print('NO')
  59.  
  60. # Перевернуть число (программа 100 не выдаёт, но я уверен в правильности решения данной задачи.)
  61. s = input()
  62. y = s.find('0', 0)
  63. if y == 0:
  64.     while y == 0:
  65.         s = s[1:]
  66.         y = s.find('0', 0)
  67. print(s[::-1])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement