시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 256 MB 88 32 29 47.541%

문제

Golden Valley(골든 벨리) 의류 창고에는 겨울 재고가 많이 쌓여있는데, 곧 들어올 봄 여름 신상품을 위한 공간 마련을 위해 겨울 재고를 빨리 판매하려 합니다. 관리자는 상당히 복잡한 세일 정책을 생각했고, 당신에게 그것을 시행하도록 맡겼습니다.

여기에 관리자가 정해놓은 규칙이 있습니다.

물건들에는 색이 있는 점 모양의 스티커가 하나씩 붙어있습니다. 각각의 점은 아래 표와 같은 할인 비율을 나타냅니다.

점의 색깔 할인율%
빨강색 45
초록색 30
파란색 20
노란색 15
주황색 10
흰색 5

또한, 관리자는 할인 쿠폰을 뿌리고 있습니다! 할인 쿠폰을 가진 고객은 할인된 가격에서 추가로 5%의 할인을 받습니다.

당신은 주어진 각 항목의 할인된 가격을 계산해야합니다. 당신의 프로그램은 판매되는 동안 계속 작동해야하고, 소수점 셋째 자리에서 반올림해야합니다.

만약 고객이 현금을 지불하면, 당신은 소수점 둘째 자리에서 반올림하셔야 합니다. 단, 이때 5는 버려집니다. 즉 0.05를 반올림하면 0.00이 되고, 0.06을 반올림하면 0.10이 됩니다.

입력

첫 번째 줄의 입력은 양의 정수이며, N(0 < N <= 100)은 구매자 수를 의미하며 다음 라인은 각자의 구매를 나타냅니다.

각 행은 다음과 같은 형식이며, 항목은 공백으로 구분됩니다.

<원래 가격><dots(점)><쿠폰><결제>
  • <원래 가격>: 모든 할인 전 품목의 가격, 소수점은 2번째 자리까지입니다.
  • <dots(점)>: 점의 색깔이며, 색의 첫 글자인 대문자를 이용하여 색을 나타냅니다.
  • <쿠폰>: C는 쿠폰이 있는 경우, X는 쿠폰이 없는 경우를 의미합니다.
  • <결제>: C는 현금결제를, P는 카드결제를 의미합니다.

출력

입력 받은 것의 할인된 가격을 한 줄에 출력해야 합니다. 그리고 이러한 형식입니다.

$d.cc

즉, 달러기호, 금액, 소수점 2자리까지이며, 소수점이 0인 경우, 0을 표시해야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