Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from collections import deque
- daily_portions = [int(x) for x in input().split(', ')]
- daily_stamina = deque(int(x) for x in input().split(', '))
- conquered_peaks = []
- dictionary = {
- 'Vihren': 80,
- 'Kutelo': 90,
- 'Banski Suhodol': 100,
- 'Polezhan': 60,
- 'Kamenitza': 70
- }
- while daily_stamina:
- position = daily_portions.pop()
- stamina = daily_stamina.popleft()
- sum_position_stamina = position + stamina
- for peak, difficulty in dictionary.items():
- if sum_position_stamina >= difficulty and peak not in conquered_peaks:
- conquered_peaks.append(peak)
- dictionary[peak] = difficulty
- print(conquered_peaks)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement