当前位置:网站首页>洛谷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从入门到实战——所有任务完成(笔记)
- Release of global Unicorn list in 2021: the full list of 301 Unicorn enterprises in China is coming!
- 数据平台调度升级改造 | 从Azkaban 平滑过度到Apache DolphinScheduler 的操作实践
- VMware vSphere ESXi 7.0安装教程
- 如何将队列里面的内容没秒钟执行一次优先级
- Acwing周赛57-数字操作-(思维+分解质因数)
- Go从入门到实战——接口(笔记)
- Go从入门到实战——行为的定义和实现(笔记)
- ICML2022 | 可扩展深度高斯马尔可夫随机场
- Go从入门到实战——多态(笔记)
猜你喜欢

VMware vSphere esxi 7.0 installation tutorial

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

Data platform scheduling upgrade and transformation | operation practice from Azkaban smooth transition to Apache dolphin scheduler

Kirin V10 installation font

SQL必需掌握的100个重要知识点:排序检索数据

Go from introduction to actual combat - panic and recover (notes)

Release of global Unicorn list in 2021: the full list of 301 Unicorn enterprises in China is coming!

Go从入门到实战——共享内存并发机制(笔记)

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

图解基于AQS队列实现的CountDownLatch和CyclicBarrier
随机推荐
squid代理服務器
通过CE修改器修改大型网络游戏
Go from entry to practice -- CSP concurrency mechanism (note)
Codeforces Round #719 (Div. 3)
Go from entry to practice - dependency management (notes)
Educational Codeforces Round 108 (Rated for Div. 2)
Special tutorial - Captain selection game
A set of system to reduce 10 times the traffic pressure in crowded areas
SQL必需掌握的100个重要知识点:组合 WHERE 子句
Go from introduction to practice -- coordination mechanism (note)
SQL必需掌握的100个重要知识点:用通配符进行过滤
Goldfish rhca memoirs: do447 managing projects and carrying out operations -- creating job templates and starting jobs
Galaxy Kirin system LAN file sharing tutorial
Null pointer exception
Contest 2050 and Codeforces Round #718 (Div. 1 + Div. 2)
空指针异常
抖音的兴趣电商已经碰到流量天花板?
系统自带的karsonzhang/fastadmin-addons报错
Ceph分布式存储
CORBA 架构体系指南(通用对象请求代理体系架构)