ZOJ-3693
来源:互联网 发布:手机壁纸 知乎 编辑:程序博客网 时间:2024/06/03 17:22
坑爹的精度问题。。到最后也没搞懂最后加个0.0049是干吗的,%.2lf明明是已经是四舍五入了啊。。无语
#include<stdio.h>#include<math.h>int main(){int n, k;double w;while (scanf("%d %lf %d", &n, &w, &k) != EOF)printf("%.2lf\n", 0.0049 + ((n + 2) - (n + 2) / k) * w / 2);return 0;}
0 0
- zoj 3693
- ZOJ-3693
- ZOJ 3693-进位
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- 开源不只是面对开发者更多的问题还在等待我们去深思
- linux下qt自动补齐功能(类似qtcreator)
- 网络编程中的同步与异步,阻塞与非阻塞
- 线性转化与坐标轴收缩(linear transform and ollapsed on some axis)
- 【LB】稀疏矩阵的快速转置原理及其算法
- ZOJ-3693
- 实现复数类中的运算符重载3
- C++虚函数浅探
- Hibernate Annotation 一对多/多对一双向关联
- compilation terminated. In file included from <command-line>:0:0: /usr/include/stdc-predef.h:30:26:
- QtCreator各个版本下载
- android之抽象类与接口的区别
- C语言宏定义——一年有多少秒
- JAVA面试问题(1)