General
 
 
# Author Problem Lang Verdict Time Memory Sent Judged  
53560020 Practice:
mnbvmar
1150A - 45 Python 3 Accepted 109 ms 40 KB 2019-04-30 11:55:10 2019-04-30 11:55:10
 
 
→ Source
R = int(input().split()[-1])

best_buy = min(map(int, input().split()))
best_sell = max(map(int, input().split()))

num_buy = R // best_buy

print(max(R, R + (best_sell - best_buy) * num_buy))
 
 
?
Time: ? ms, memory: ? KB
Verdict: ?
Input
?
Participant's output
?
Jury's answer
?
Checker comment
?
Diagnostics
?
Click to see test details