再分肥宅水
每人 t/n 毫升(三位小数),杯子 2n 个
正文
// 原题:https://oj.yecheng.tv/p/1348
// 题意:t 毫升均分给 n 人,每人 2 个杯子。输出每人得多少毫升(三位小数)和总杯子数。
// 思路:每人 = t / n;杯子 = 2 * n。
// 复杂度:O(1)。
// 易错点:毫升保留三位小数;杯子数是整数。
#include <iostream>
#include <iomanip>
using namespace std;
int main() {
double t;
int n;
cin >> t >> n;
cout << fixed << setprecision(3);
cout << t / n << endl;
cout << 2 * n << endl;
return 0;
}