#C11782. Packaging Efficiency

    ID: 41136 Type: Default 1000ms 256MiB

Packaging Efficiency

Packaging Efficiency

You are given three integers \(N\), \(B\), and \(W\), where \(N\) is the total number of pastries, \(B\) is the maximum number of pastries that can be packed in one box, and \(W\) is the weight of each pastry. Each box can only be considered if it is completely filled with \(B\) pastries. The pastries that cannot fill a box completely are considered leftovers and are not packed.

Your task is to compute two values:

  • The total weight of the packed pastries (only those in complete boxes), which is calculated as the number of packed pastries multiplied by \(W\).
  • The number of leftover pastries that do not fill an entire box.

Input: Three integers \(N\), \(B\), and \(W\) provided via standard input (stdin).

Output: Two integers: the total weight of the pastries in complete boxes and the number of leftover pastries, separated by a space, output to standard output (stdout).

Note: Use the formula for integer division: the number of fully packed boxes is \(\lfloor N/B \rfloor\) and the number of leftover pastries is \(N \mod B\).

inputFormat

The input consists of a single line containing three space-separated integers: \(N\) (the total number of pastries), \(B\) (the number of pastries per box), and \(W\) (the weight of each pastry).

outputFormat

Output two space-separated integers: the total weight of the packed pastries and the number of leftover pastries.

## sample
10 3 2
18 1

</p>