#C4868. Find Shelf and Position in Library

    ID: 48453 Type: Default 1000ms 256MiB

Find Shelf and Position in Library

Find Shelf and Position in Library

You are given a series of queries representing the book numbers in a library. In this library, books are arranged in shelves, with each shelf holding exactly 10 books. For a given book number (B), the shelf number is calculated using the formula (\lfloor (B-1)/10 \rfloor + 1) and the position on that shelf is ((B-1) \mod 10 + 1).

Given (Q) queries, your task is to determine for each query the shelf and position in the format shelf-position.

inputFormat

The input is given via standard input (stdin).

The first line contains an integer (Q) representing the number of queries.
The second line contains (Q) positive integers separated by spaces, each representing a book number.

outputFormat

For each query, output a line with the corresponding shelf and position in the format shelf-position. Each result should be printed on a new line via standard output (stdout).## sample

3
1 15 25
1-1

2-5 3-5

</p>