# C++每日一题 Day 1 肥宅水

***

lhy版权所有，禁止转载

### 知识点：变量，浮点型变量，变量运算

***

## 题目描述

现在有 t 毫升肥宅快乐水，要均分给 n 名同学。每名同学需要 2 个杯子。现在想知道每名同学可以获得多少毫升饮料，以及一共需要多少个杯子。输入一个实数 t 和一个整数 n，使用空格隔开。输出两个数字表示答案，使用换行隔开。

## 输入

100000≤*t*≤10000且不超过3位小数，10001≤*n*≤1000

## 输入输出样例

**输入**

```
500.0 3
```

**输出**

```
166.667
6
```

***

## 回答要求

* 附上你完成本程序的完整代码
* 为什么你的代码中声明变量时要使用float或double而不是int？简单讲讲你的理解
* 拓展：c++中有什么办法可以限定输出的数字为三位小数？修改程序以使答案保留三位小数。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://blog.mcyou.cc/c++-mei-ri-yi-ti/c++-mei-ri-yi-ti-day-1-fei-zhai-shui.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
