Java-POJ1004-Financial Management
题目大意:求出一年十二个月Larry平均每个月得到的利息
读入:12行每行一个浮点数
关于控制浮点数输出位数的资料:https://blog.csdn.net/hsliwei/article/details/6914774
package poj.ProblemSet; import java.text.DecimalFormat;
import java.util.Scanner; public class poj1004 {
public static void main(String[] args) {
Scanner cin=new Scanner(System.in);
double sum=0.0;
for (int i = 0; i < 12; i++)
sum+=cin.nextDouble();
DecimalFormat ans = new DecimalFormat(".00");
//.00表示保留的两位小数位
System.out.println("$"+ans.format(sum/12));
}
}
Java-POJ1004-Financial Management的更多相关文章
- 练习英语ing——[POJ1004]Financial Management
[POJ1004]Financial Management 试题描述 Larry graduated this year and finally has a job. He's making a lo ...
- POJ1004 Financial Management
题目来源:http://poj.org/problem?id=1004 题目大意: Larry今年毕业并找到了工作.他开始赚很多的钱,然而他似乎总觉得不够.Larry决定好好掌控他的资产,解决他的财务 ...
- Financial Management[POJ1004]
Financial Management Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 179458 Accepted: ...
- Java Business Process Management(业务流程管理) 初识环境搭建
一.简介 (一)什么是jbpm JBPM,全称是Java Business Process Management(业务流程管理),它是覆盖了业务流程管理.工作流.服务协作等领域的一个开源的.灵活的.易 ...
- poj 1004:Financial Management(水题,求平均数)
Financial Management Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 126087 Accepted: ...
- Financial Management 分类: POJ 2015-06-11 10:51 12人阅读 评论(0) 收藏
Financial Management Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 164431 Accepted: ...
- Introduction to Financial Management
Recently,i am learning some useful things about financial management by reading <Essentials of Co ...
- [POJ] #1004# Financial Management : 浮点数运算
一. 题目 Financial Management Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 173910 Acc ...
- 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 ...
随机推荐
- HTML5 canvas绘图基础(电子名片生成器源码)
创建canvas <canvas id="myCanvas" class="canvas"> 您的浏览器不支持canvas </canvas& ...
- 下载thinkphp5.0
在服务器文件中右击Git_Bash_Here打开 在命令框写入 首先克隆下载应用项目仓库 git clone https://github.com/top-think/think tp5 tp5代 ...
- vue 学习3
在 2.5.0 及以上版本中,如果你使用了单文件组件 $children,$slots,$attrs .... $attrs 可以透传props 注意.模板标签上有:属性="a", ...
- vue 学习2
模板指令.属性总结 html 中的标签属性 1. :class 值是对象,key为class 的值,值为boolean类型 html标签任意属性都可以:属性,表示动态值(值是变化的,不是固定不变的) ...
- Game with string CodeForces - 1104B
虽然只是B题,还是div2的 但感觉挺有意思,所以写一篇博客记录一下 最初的想法是利用DP去做,f[s]=true表示字符串s对应先手赢,否则对应后手赢,大致想了下发现是指数级别的算法,看了下范围直接 ...
- 如果在vscode 中用运行快捷键(Ctrl+Alt+N)出现中文的乱码
在VSCODE中,运行代码的快捷方式是Ctrl+Alt+N,终止 代码运行的方式是Ctrl+Alt+M,但是有时候会出现汉字的乱码,这种情况并不是代码有问题,只要在terminal 中运行代码就可以了 ...
- http中长连接和websocket的长连接的区别
一.什么是http协议 HTTP是一个应用层协议,无状态的,端口号为80.主要的版本有1.0/1.1/2.0. HTTP/1.* 一次请求-响应,建立一个连接,用完关闭: HTTP/1.1 串行化 ...
- 论文阅读笔记(八)【IEEEAccess2019】:High-Resolution and Low-Resolution Video Person Re-Identification: A Benchmark
Introduction (1)Motivation: 监控视频中的行人,有的比较清晰,有的因为距离较远非常模糊. 在高低分辨率方面的行人重识别缺乏数据集和研究. (2)Contribution: ① ...
- 记PHP使用rtrim()导致获得的数据乱码问题
一.问题描述: 我用rtrim()函数去除右侧多余的"."号,去除之后,发现乱码. 二.出现原因: 当右侧没有分号,要去除的字符串的十六进制又刚刚好以81结尾,就导致81被去除,从 ...
- UI中class的用法:
easyui的引入:<link rel="stylesheet" type="text/css" href="easyui/themes/def ...