Advertisement
Dimaush

7140

Nov 20th, 2022
1,093
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.53 KB | None | 0 0
  1. max_multiple_7 = 0
  2. max_multiple_1 = 0
  3.  
  4. n = 0
  5. a = int(input())
  6. while a != 0:
  7.     n += 1
  8.     if a % 7 == 0 and a % 49 != 0:
  9.             max_multiple_7 = max(max_multiple_7, a)
  10.     else:
  11.         max_multiple_1 = max(max_multiple_1, a)
  12.     a = int(input())
  13.  
  14. r = int(input())
  15.  
  16. print('input:', n)
  17. print('reference value:', r)
  18. if max_multiple_7 == 0 or max_multiple_1 == 0:
  19.     c = 1
  20. else:
  21.     c = max_multiple_7 * max_multiple_1
  22. print('calculated value:', c)
  23. if r == c:
  24.     print('values true')
  25. else:
  26.     print('values false')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement