Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = ''
- PriceList = []
- NameList = [[]]
- SectionList = []
- while (x != '!'):
- x = input()
- if x == '!':
- break
- price, name, section = x.split('-')
- PriceList.append(int(price))
- NameList.append(name.split())
- SectionList.append(section)
- n = int(input())
- sum = 0
- for i in range(len(PriceList)):
- if len(NameList[i]) == n:
- sum += 0.1 * PriceList[i]
- print(f'Скидка {sum} рублей')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement