#P5706. 【深基2.例8】再分肥宅水

【深基2.例8】再分肥宅水

Sharing the Soda

Problem Source

Luogu P5706

Problem Description

Now there are tt millilitres of soda to be shared equally among nn classmates. Each classmate needs 22 cups. You need to find out how many millilitres of drink each classmate gets (strictly to 3 decimal places), and how many cups are needed in total.

Input Format

One real number tt and one positive integer nn, separated by a space.

Output Format

Output two lines.

The first line outputs a number with 3 decimal places: the amount of drink each classmate gets. The second line outputs a positive integer: the total number of cups needed.

Sample Input

500.0 3

Sample Output

166.667
6

Hint

  • A single line mixes a decimal and an integer; cin can tell them apart automatically, but you must pick the right type for each variable yourself.
  • "How much each person gets" is a division whose result is a decimal — think about what type the dividend should be.
  • Keeping 3 decimal places needs format control (fixed and setprecision, from the header <iomanip>).
  • The output is two lines: the first line is the amount per person, the second line is the number of cups.
  • Check against the sample: 500.0 3 → first line 166.667, second line 6.

For all data, 0≤t≤100000 \le t \le 10000 with at most 33 decimal places, and 1≤n≤10001 \le n \le 1000.