#K59207. Pages Distribution Problem

    ID: 30813 Type: Default 1000ms 256MiB

Pages Distribution Problem

Pages Distribution Problem

In this problem, you are given the total number of pages in a book, (p), and a number of days, (d). Your task is to determine the number of pages to be read each day using floor division and the remaining pages that will be read on the final day.

mathematically, the pages read per day is given by: (pages = \lfloor \frac{p}{d} \rfloor) and the remainder is (remainder = p \mod d).

inputFormat

The input consists of two integers separated by a space: (p) (the total number of pages) and (d) (the number of days).

outputFormat

Output two integers separated by a space. The first integer is the number of pages read each day (using floor division) and the second integer is the remaining pages that need to be read on the final day.## sample

50 7
7 1