当前位置:网站首页>Luogu p5706 redistributing fertilizer and house water
Luogu p5706 redistributing fertilizer and house water
2022-06-27 21:53:00 【I want a very, very, very long name】
happy water writing ~ヾ(≧ ▽ ≦)ゝ
Title Description
Now there is t Ml fat house happy water , Give them all to n Famous students . Every student needs 2 Cups . Now I want to know how many milliliters of drinks each student can get ( Strictly accurate to the decimal point 3 position ), And how many cups are needed . Enter a real number t And an integer n, Use spaces to separate . Output two numbers to indicate the answer , Use a newline to separate .
1≤t≤10000 And no more than 3 Decimal place ,1≤n≤1000
Explain
This question is often grey and often simple , Kindergarten math .
Code
#include<bits/stdc++.h>
using namespace std;
double kls;// How much happy water can each person get
int bz;// Number of cups
int tx;// Number of students
int main()
{
cin>>kls>>tx;
kls/=tx;
bz=tx*2;
cout<<fixed<<setprecision(3)<<kls<<endl<<bz;
return 0;
}
边栏推荐
- Go从入门到实战——依赖管理(笔记)
- Go从入门到实战——仅执行一次(笔记)
- [LeetCode]30. Concatenate substrings of all words
- Magic POI error in reading excel template file
- Go from starting to Real - Interface (note)
- String类的常用方法
- Common methods of string class
- Go从入门到实战——所有任务完成(笔记)
- C language programming detailed version (learning note 1) I can't understand it after reading, and I can't help it.
- Go 访问GBase 8a 数据库的一个方法
猜你喜欢
Icml2022 | scalable depth Gaussian Markov random field
[LeetCode]动态规划解拆分整数I[Silver Fox]
关于异常处理的知识整理
Yu Wenwen, Hu Xia and other stars take you to play with the party. Pipi app ignites your summer
畅游动态规划之区间DP
快递e栈——数组篇小型项目
微服务之远程调用
Go from introduction to practice - Interface (notes)
STM32F107+LAN8720A使用STM32cubeMX配置网络连接+tcp主从机+UDP app
Go从入门到实战——CSP并发机制(笔记)
随机推荐
大厂常用软件测试面试题三(附答案)
∫(0→1) ln(1+x) / (x² + 1) dx
Codeforces Round #717 (Div. 2)
C语言程序设计详细版 (学习笔记1) 看完不懂,我也没办法。
Go from introduction to actual combat - panic and recover (notes)
Knowledge sorting of exception handling
Set code exercise
[leetcode] dynamic programming solution partition array ii[arctic fox]
快递e栈——数组篇小型项目
[LeetCode]508. 出现次数最多的子树元素和
IO stream code
[leetcode] dynamic programming solution partition array i[red fox]
开源技术交流丨一站式全自动化运维管家ChengYing入门介绍
Go from introduction to practice - Interface (notes)
After being forced to develop the app within 20 days, the group was laid off, and the technical director angrily criticized it: I wish "closure as soon as possible!"
matlab查找某一行或者某一列在矩阵中的位置
Go从入门到实战——行为的定义和实现(笔记)
String类的常用方法
[LeetCode]30. 串联所有单词的子串
TreeSet details