GDUFE ACM-1030
题目:http://acm.gdufe.edu.cn/Problem/read/id/1030
Financial Management
Time Limit: 4000/2000ms (Java/Others)
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:
123.45 3.65 37.54 845.43 65.23 545.57 2.00 3.42 334.52 535.67 56.3 2.34
Sample Output:
$212.93 思路:把几个数加起来,再除以12 难度:很简单 代码:
1 #include<stdio.h> 2 int main() 3 { 4 double n,sum; 5 int i; 6 sum=0; 7 for(i=0;i<12;i++) 8 {scanf("%lf",&n); 9 sum=sum+n;} 10 printf("$%.2lf\n",sum/12); 11 return 0; 12 }
转载于:https://www.cnblogs.com/ruo786828164/p/6006360.html
GDUFE ACM-1030相关推荐
- gdufe acm 1086 互质数
题目链接: http://acm.gdufe.edu.cn/Problem/read/id/1086 互质数 Time Limit: 2000/1000ms (Java/Others) Problem ...
- gdufe acm 1363 校庆嘉宾
链接:http://acm.gdufe.edu.cn/Problem/read/id/1363 Problem Description: 广财建校33年了,如今迎来了她的校庆,并在今天晚上19:00举 ...
- gdufe acm 1361 校庆抽奖
链接: http://acm.gdufe.edu.cn/Problem/read/id/1361 Problem Description: 广财建校33年了,如今迎来了她的校庆,并在今天晚上19:00 ...
- 网内计算:可编程数据平面和技术特定应用综述
网内计算:可编程数据平面和技术特定应用综述 摘要--与云计算相比,边缘计算提供了更靠近终端设备的处理,降低了用户体验的延迟.最新的In-Network Computing范例采用可编程网络元素在数据达 ...
- ACM程序设计选修课——1030: Hungar的时尚球场(水题+耐心)
1030: Hungar的时尚球场 Time Limit: 1 Sec Memory Limit: 64 MB Submit: 14 Solved: 8 [Submit][Status][Web ...
- 南邮 OJ 1030 ACM程序设计之马拉松竞赛
ACM程序设计之马拉松竞赛 时间限制(普通/Java) : 1000 MS/ 3000 MS 运行内存限制 : 65536 KByte 总提交 : 1434 ...
- 2017 ACM ICPC Asia Shenyang Regional Contest 题解(10 / 13)【每日亿题2 / 16】
整理的算法模板合集: ACM模板 点我看算法全家桶系列!!! 实际上是一个全新的精炼模板整合计划 目录 A.(2017 ICPC shenyang I)Little Boxes B.(2017 ICP ...
- GDUFE ACM-1045
题目:http://acm.gdufe.edu.cn/Problem/read/id/1045 Elevator Time Limit: 2000/1000ms (Java/Others) Probl ...
- 1030: [JSOI2007]文本生成器 ac自动机+dp
https://www.lydsy.com/JudgeOnline/problem.php?id=1030 求长度为m不包含n个子串的种数, 跑完ac自动机之后没办法跑矩阵快速幂,因为状态数比较大(6 ...
最新文章
- 好玩的python代码示例-这可能是最好玩的python GUI入门实例!
- 机器学习之单标签多分类及多标签多分类
- foxmail怎么加入黑名单 foxmail导入黑名单邮箱地址的教程
- 设备上的介质簇的结构不正确_环保设备选型参考系列——生化系统之潜水搅拌机【价格】...
- Python打印到文件
- jquery 上下无缝滚动
- 深入理解jQuery插件开发
- VS2015 LINK : warning LNK4068: 未指定 /MACHINE;默认设置为 X86
- H3C交换机创建ssh用户登录和设置aux密码
- 渗透入门——术语概述
- MPQ4420HGJ DCDC电源设计+SIMetrix+Spice仿真模型
- 关于JlinkV8在SEGGSE-JLINK驱动V6.0以上版本连接调试不了的解决方法
- python wmic_wmic linux python
- MySql 磁盘满了的处理
- socket服务器针对客户端ip变更的处理办法
- 二进制的加减乘除实现
- 内网域横向PTHPTKPTT哈希票据传递
- 【同一电脑原win用户信息迁移到新Win用户下python interpreter显示 no interpreter问题】
- effective modern cpp
- ClickHouse 实践