Toggle navigation
YouTube
Facebook
Telegram
english
english
українська
Algotester 4.3
Build 496
2024-10-17
Log In
Contact Us
College
Sponsors
Donate
Sources
PyPy
a1, b1, a2, b2, a3, b3, x = map(int, input().split()) s1 = (x // b1 + 1) * a1 s2 = (x // b2 + 1) * a2 s3 = (x // b3 + 1) * a3 mx = max(s1, s2, s3) if mx == s1: print(1) elif mx == s2: print(2) elif mx == s3: print(3)