Advertisement
dmemsm

Задача 4

Apr 13th, 2025
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. n = int(input())
  2. q = [int(i) for i in input().split()]
  3. c = [int(i) for i in input().split()]
  4. X = int(input())
  5.  
  6. money = [c[i] * q[i] for i in range(n)]
  7.  
  8. print(money.index(sorted(money)[X - 1]) + 1)
  9.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement