nyoj 72-Financial Management (求和 ÷ 12.0)
72-Financial Management
内存限制:64MB
时间限制:3000ms
特判: No
通过数:7
提交数:12
难度:1
题目描述:
输入描述:
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.
输出描述:
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.
样例输入:
100.00
489.12
12454.12
1234.10
823.05
109.20
5.27
1542.25
839.18
83.99
1295.01
1.75
样例输出:
1581.42 题意:
将1~12月的money相加再除以12,得到的结果保留两位小数 C/C++代码实现(AC);
#include <iostream>
#include <algorithm>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <stack>
#include <map>
#include <queue>
#include <set> using namespace std;
const int MAXN = ;
int A[MAXN]; int main()
{
double a, cnt = 0.0;
for(int i = ; i < ; ++ i)
{
scanf("%lf", &a);
cnt += a;
}
printf("%.2lf", cnt / 12.0);
return ;
}
nyoj 72-Financial Management (求和 ÷ 12.0)的更多相关文章
- 72.Financial Management
描述 Larry graduated this year and finally has a job. He's making a lot of money, but somehow never se ...
- Financial Management 分类: POJ 2015-06-11 10:51 12人阅读 评论(0) 收藏
Financial Management Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 164431 Accepted: ...
- Financial Management[POJ1004]
Financial Management Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 179458 Accepted: ...
- 练习英语ing——[POJ1004]Financial Management
[POJ1004]Financial Management 试题描述 Larry graduated this year and finally has a job. He's making a lo ...
- Financial Management
Financial Management 时间限制:3000 ms | 内存限制:65535 KB 难度:1 描述 Larry graduated this year and finally ...
- Financial Management POJ - 1004
Financial Management POJ - 1004 解题思路:水题. #include <iostream> #include <cstdio> #include ...
- UVA 11945 Financial Management 水题
Financial Management Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 acm.hust.edu.cn/vjudge/problem/vis ...
- [POJ] Financial Management
Financial Management Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 182193 Accepted: ...
- POJ 3100 Root of the Problem || 1004 Financial Management 洪水!!!
水两发去建模,晚饭吃跟没吃似的,吃完没感觉啊. ---------------------------分割线"水过....."--------------------------- ...
随机推荐
- Intel Sandy Bridge Microarchitecture Events
This is a list of all Intel Sandy Bridge Microarchitecture performance counter event types. Please s ...
- Github 高级搜索功能
参考文章链接:https://zhuanlan.zhihu.com/p/55294261 GitHub 提供高级搜索方式. 一.明确搜索仓库标题.仓库描述.README 1.只想查找仓库名称包含XX的 ...
- TCP Traffic Analyzer
TCP Traffic Analyzer 工具yahoo 发布的一款开源网络分析工具,可以分析网络应用在服务器端与客户端之间的运行状态Yconalyzer保持与tcpdump兼容,两者生成的抓取文件能 ...
- MFC::Visual studio ? 对应VC6-14
VC6VC7: Visual studio.netVC7.1: Visual studio 2003VC8: Visual studio 2005VC9: Visual studio 2008VC10 ...
- 使用zepto中animate报错“Uncaught TypeError: this.bind is not a function”的解决办法
在使用zepto时,我先引入zepto.min.js,然后引入fx.js,但是在使用animate函数时,控制台却报如下错误: Uncaught TypeError: this.bind is not ...
- 探究JavaScript闭包
什么是JavaScript闭包? 刚开始知道这个词,就误以为是自动执行的匿名函数块. 比如说+function(){}(); 然而并不是,那么请看下面的例子: function init() { va ...
- Java多线程编程(五)定时器Timer
一.定时器Timer的使用 在JDK库中Timer类主要负责计划任务的功能,也就是在指定的时间开始执行某一个任务.Timer类的主要作用就是设置计划任务,但封装任务的类确实TimerTask类,执行计 ...
- Linux之Centos7开机之后连不上网
问题:ns33mtu 1500 qdisc noop state DOWN group default qlen 1000 解决方法: root@topcheer ~]# systemctl stop ...
- flask插件之flask_session会话机制
flask-session是flask框架的session组件,由于原来flask内置session使用签名cookie保存,该组件则将支持session保存到多个地方,如: redis:保存数据的一 ...
- spring boot 面试题详解
1.什么是springboot 用来简化spring应用的初始搭建以及开发过程 使用特定的方式来进行配置(properties或yml文件) 创建独立的spring引用程序 main方法运行 嵌入的T ...