当前位置:网站首页>洛谷P5706 再分肥宅水
洛谷P5706 再分肥宅水
2022-06-27 19:27:00 【我要取个特别特别特别特别特别特别长的名字】

快乐water文~ヾ(≧ ▽ ≦)ゝ
题目描述
现在有 t 毫升肥宅快乐水,要均分给 n 名同学。每名同学需要 2 个杯子。现在想知道每名同学可以获得多少毫升饮料(严格精确到小数点后 3 位),以及一共需要多少个杯子。输入一个实数 t 和一个整数 n,使用空格隔开。输出两个数字表示答案,使用换行隔开。
1≤t≤10000且不超过3位小数,1≤n≤1000
解
这题灰常灰常简单,幼儿园数学。
Code
#include<bits/stdc++.h>
using namespace std;
double kls;//每人能分到多少快乐水
int bz;//杯子个数
int tx;//同学个数
int main()
{
cin>>kls>>tx;
kls/=tx;
bz=tx*2;
cout<<fixed<<setprecision(3)<<kls<<endl<<bz;
return 0;
}边栏推荐
- Go从入门到实战——CSP并发机制(笔记)
- Codeforces Global Round 14
- Educational Codeforces Round 108 (Rated for Div. 2)
- Go从入门到实战——Panic和recover(笔记)
- Modify large online games through CE modifier
- Scrum和看板的区别
- 100 important knowledge points that SQL must master: filtering data
- Bit.Store:熊市漫漫,稳定Staking产品或成主旋律
- 系统自带的karsonzhang/fastadmin-addons报错
- Codeforces Round #719 (Div. 3)
猜你喜欢

数据平台调度升级改造 | 从Azkaban 平滑过度到Apache DolphinScheduler 的操作实践

Go从入门到实战——接口(笔记)

Icml2022 | scalable depth Gaussian Markov random field

Codeforces Round #717 (Div. 2)

跟我一起AQS SOS AQS

Process control task

Codeforces Global Round 14

Can Oracle's CTAs bring constraints and other attributes to the new table?

关于异常处理的知识整理

Go从入门到实战——仅执行一次(笔记)
随机推荐
Go从入门到实战——错误机制(笔记)
100 important knowledge points that SQL must master: creating calculation fields
Let Ma Huateng down! Web3.0, hopeless
集合代码练习
GoLand permanently activated
麒麟V10安装字体
根据自定义excel标题模板快速excel导出
squid代理服務器
Flask----应用案例
Focus! Tips for installing fonts on domestic computers
What is the core competitiveness of front-line R & D personnel aged 35~40 in this position?
Data platform scheduling upgrade and transformation | operation practice from Azkaban smooth transition to Apache dolphin scheduler
CEPH distributed storage
GFS分布式文件系统
GoLand永久激活
系统自带的karsonzhang/fastadmin-addons报错
Go从入门到实战——任务的取消(笔记)
Scrum和看板的区别
动态刷新mapper看过来
gomock mockgen : unknown embedded interface