H. [2023 OUCC Round 1] Guest Goes Free

    传统题 1000ms 256MiB

[2023 OUCC Round 1] Guest Goes Free

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

The Developers Social Club (DSC) holds a monthly meeting at a restaurant where a guest is always invited. The DSC consists of 10 members but they do not always attend the monthly meal. The guest is never asked to pay so the cost of the meal is shared by the DSC members attending like this:

  1. The total bill from all the diners is calculated.
  2. A tip of 5% is added (no rounding).
  3. The individual bill for the DSC members is calculated by dividing the total including the tip by the number of diners - 1. (The guest never pays.)
  4. The result of the calculation above is rounded down to the nearest whole pence.

Obviously the DSC would like a computer to do this. They have invited you to join the DSC as long as you will write them a program to sort out their monthly restaurant payments.

Task:

Write a program that takes, as input, the total number of diners and their individual bills and outputs how much each of the DSC members attending the meal should pay.

Constraints:

[Note: you do not need to check constraints in your code for this competition - they are just for information about the range of test data values.]

  • Maximum number of diners = 10 DSC members + 1 guest.
  • The individual bills never come to more than £100.
Input format:
  • Row 1: The number of diners, ​n​, including the guest as an integer.
  • n rows of data: Each row of data consists of a float to 2 decimal places. (The individual bills.)
Output format:
  • The cost each DSC has to pay to cover the bill and tip in UK money format. (e.g. ​5.60​)
Example:
5
5.60
7.42
3.16
6.94
9.20
8.48

2020 OUCC

未参加
状态
已结束
规则
IOI
题目
8
开始于
2024-10-30 14:00
结束于
2024-10-30 16:00
持续时间
2 小时
主持人
参赛人数
2