杭电 HDU 1064 Financial Management
来源:互联网 发布:axure 浏览器插件 mac 编辑:程序博客网 时间:2024/05/22 17:21
Financial Management
Time Limit: 400/200 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9937 Accepted Submission(s): 6175
Problem Description
Larry graduated this year and finally has a job. He’s making a lot of money, but somehow never seems to have enough. Larry has decided that he needs to grab hold of his financial portfolio and solve his financing problems. The first step is to figure out what’s been going on with his money. Larry has his bank account statements and wants to see how much money he has. Help Larry by writing a program to take his closing balance from each of the past twelve months and calculate his average account balance.
Input
The input will be twelve lines. Each line will contain the closing balance of his bank account for a particular month. Each number will be positive and displayed to the penny. No dollar sign will be included.
Output
The output will be a single number, the average (mean) of the closing balances for the twelve months. It will be rounded to the nearest penny, preceded immediately by a dollar sign, and followed by the end-of-line. There will be no other spaces or characters in the output.
Sample Input
100.00 489.12 12454.12 1234.10 823.05 109.20 5.27 1542.25 839.18 83.99 1295.01 1.75
Sample Output
$1581.42
#include<iostream>using namespace std;int main(){double sum=0;double m;int n=12;while(n--){cin>>m;sum+=m;}printf("$%.2lf\n",sum/12);return 0;}
0 0
- 杭电 HDU 1064 Financial Management
- 杭电ACM 1064 Financial Management
- 杭电ACM 1064: Financial Management
- HDU 1064 Financial Management
- hdu 1064 Financial Management
- HDU 1064 Financial Management
- HDU 1064 Financial Management
- hdu 1064 Financial Management
- HDU 1064 Financial Management
- hdu-1064-Financial Management
- hdu 1064 Financial Management
- HDU 1064 Financial Management
- hdu 1064 Financial Management
- HDU 1064Financial Management
- HDU 1064 Financial Management
- HDU 1064 Financial Management
- 【杭电-oj】-1064-Financial Management(财务管理)
- HDU 1064 && ZOJ 1048 Financial Management【水】
- 删除尺码和颜色后面价格
- PHP 设计模式
- 对的Volatile深入理解
- Codeforces 523D Statistics of Recompressing Videos 排序+优先队列
- 【数位DP】 HDU 4734 F(x)
- 杭电 HDU 1064 Financial Management
- java 获取properties配置文件属性值
- [数据结构复习]红黑树
- ASP.NET使用GridView时,出现错误“必须声明标量变量‘@ID’”的解决方法
- UVA - 11997 K Smallest Sums 归并排序+优先队列
- 深入理解内存:原理简介
- java几大排序
- 我的第一个java作品——五子棋
- bzoj2157: 旅游 树链剖分模板题