ACM学习-POJ-1004-Financial Management
菜鸟学习ACM,纪录自己成长过程中的点滴。
学习的路上,与君共勉。
ACM学习-POJ-1003-Financial Management
Time Limit: 1000MS | Memory Limit: 10000K | |
Total Submissions: 109412 | Accepted: 51958 |
Description
Input
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
Source
#include <stdio.h> int main()
{
int n = 0;
double sum_ = 0.0;
double each_month; while (~scanf("%lf", &each_month) && n < 12)
{
sum_ += each_month;
n++;
if (n==12)
{
printf("$%.2lf\n", sum_/(double)n);
break;
}
}
return 0;
}
ACM学习-POJ-1004-Financial Management的更多相关文章
- poj 1004:Financial Management(水题,求平均数)
Financial Management Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 126087 Accepted: ...
- [POJ] #1004# Financial Management : 浮点数运算
一. 题目 Financial Management Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 173910 Acc ...
- OpenJudge/Poj 1004 Financial Management
1.链接地址: http://poj.org/problem?id=1004 http://bailian.openjudge.cn/practice/1004 2.题目: 总时间限制: 1000ms ...
- poj 1004 Financial Management
求平均数,记得之前在杭电oj上做过一个求平均数的题目,结果因为题目是英文的,我就懵逼了 #include <stdio.h> int main() { ; double num; int ...
- [POJ 1004] Financial Management C++解题
参考:https://www.cnblogs.com/BTMaster/p/3525008.html #include <iostream> #include <cstdio> ...
- POJ 3100 Root of the Problem || 1004 Financial Management 洪水!!!
水两发去建模,晚饭吃跟没吃似的,吃完没感觉啊. ---------------------------分割线"水过....."--------------------------- ...
- Financial Management POJ - 1004
Financial Management POJ - 1004 解题思路:水题. #include <iostream> #include <cstdio> #include ...
- POJ 1004:Financial Management
Financial Management Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 165062 Accepted: ...
- Financial Management 分类: POJ 2015-06-11 10:51 12人阅读 评论(0) 收藏
Financial Management Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 164431 Accepted: ...
随机推荐
- 使用Hashtable和List结合拼json数据
在做项目的时候,有时候需要向页面返回一个特定的json类型的数据,一般情况下会有下面的方法进行拼接: public String chongzhiList() throws Exception { L ...
- fragment低版本
http://bbs.csdn.net/topics/390271980 Fragment框架开发东西确实很方便,但是恼人的是从4.0才开始支持.以前的版本必须用兼容模式开发,本人在网上找了大量资料, ...
- Cxf -Wsdl2java详细参数附录
wsdl2java用法: wsdl2java -p com -d src -all aa.wsdl -p 指定其wsdl的命名空间,也就是要生成代码的包名: -d 指定要产生代码所在目录 -cl ...
- codevs1166 矩阵取数游戏
题目描述 Description [问题描述] 帅帅经常跟同学玩一个矩阵取数游戏:对于一个给定的n*m 的矩阵,矩阵中的每个元素aij均 为非负整数.游戏规则如下: 1. 每次取数时须从每行各取走一个 ...
- hdu 1690 The Balance_母函数
题意:给你n个数,这些数可以互相加或者减,输出在范围[1,sum]里不能通过运算得出的数 思路:套母函数模版 #include <iostream> #include<cstdio& ...
- #include <boost/unordered_set.hpp>
boost.unordered在C++标准容器std::set,std::multiset,std::map和std::multimap的基础上多实现了四个容器:boost::unordered_se ...
- 记录一个js切换随机背景颜色的代码
<!DOCTYPE HTML> <html lang="en-US"> <head> <meta charset="UTF-8& ...
- 【SDK编程】
#include <stdio.h> #include <windows.h> int main() { DeleteFile("C:\\test.txt" ...
- LeetCode Day1
Palindrome Linked List /** * LeetCode: Palindrome Linked List * Given a singly linked list, determin ...
- Js特效总结
1.//#hidediv2为一个需要隐藏的div 这个功能实现当点击hidediv2以外的其他任何位置时,隐藏该div $(document).click(function() { ...