Tan Your Hide, Inc., owns several coin-operated tanning salons. Research has shown that if a customer arrives and there are no beds available, the customer will turn around and leave, thus costing the company a sale. Your task is to write a program that tells the company how many customers left without tanning. The input consists of data for one or more salons, followed by a line containing the number 0 that signals the end of the input. Data for each salon is a single line containing a positive integer, representing the number of tanning beds in the salon, followed by a space, followed by a sequence of uppercase letters. Letters in the sequence occur in pairs. The first occurrence indicates the arrival of a customer, the second indicates the departure of that same customer. No letter will occur in more than one pair. Customers who leave without tanning always depart before customers who are currently tanning. There are at most 20 beds per salon. For each salon, output a sentence telling how many customers, if any, walked away. Use the exact format shown below.
- 粉丝: 0
- 资源: 1
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 深圳建设施工项目安全生产管理手册.docx
- 深圳建设施工项目职工伤亡事故报告管理制度.docx
- 深圳建设施工项目防护用品使用管理制度.docx
- 深圳建设施工项目安全生产教育培训管理制度.docx
- 深圳建设施工项目易燃、易爆、有毒、有害物品管理制度.docx
- 深圳建设施工项目班组安全活动管理制度.docx
- 深圳建设项目文明施工管理制度.docx
- 深圳建设项目安全生产技术措施管理制度.docx
- C#实用教程郑阿奇梁敬东程序源代码及电子课件
- 调查问卷系统源代码全套技术资料.zip
- 前端分析-2023071100789
- ieee14潮流计算程序,ieee14节点潮流计算报告,matlab
- ieee14潮流计算程序,ieee14节点潮流计算报告,matlab
- ieee14潮流计算程序,ieee14节点潮流计算报告,matlab
- 前端分析-2023071100789-y5
- welearn刷时长版本v3.0.bat