F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Ticket

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others)
Total Submission(s): 2822    Accepted Submission(s): 1614


Problem Description
北京地铁票每月的打折规则为:本次乘车前总消费不足 100 元本次不打折,满 100 元不足 150 元本次打8 折,满 150 元不足 400 元本次打 5 折,已满 400 元后本次不打折,已知 wls 每次出行的原票价,请问实际的花费是多少?
 

Input
输入包含两行。第一行一个整数 $n$ 代表 wls 将要出行的次数。第二行 $n$ 个正整数, $a_i$ 代表每次出行的票的原价,wls 是按照输入顺序依次出行的。
0 ≤ $n$ ≤ 1, 000
0 < $a_i$ ≤ 1, 000
 

Output
一行一个数,代表实际的花费,保留小数点后两位小数。
 

Sample Input
3 100 20 20
 

Sample Output
132.00
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-04-23 15:37:18, Gzip enabled