#MTHA0000008. Trang và vị trí (Page and Position)
Trang và vị trí (Page and Position)
Page and Position
Version: Phuoc Hung OJ Extended
Problem Statement
A list has items numbered from to . Each page contains at most consecutive items. Given position , determine the page containing item and the position of that item within the page. Both indices start at .
Input
One line contains three positive integers , , and .
Output
Print two integers: the page number containing item and its position within that page.
Subtasks
- Subtask 1 (30 points):
- .
- .
- Subtask 2 (70 points):
- .
- .
Examples
Example 1
Input
100 12 37
Output
4 1
Explanation
The first three pages contain items; item is the first item on page .
Example 2
Input
50 10 50
Output
5 10
Explanation
With items per page, item is on page at position .
Example 3
Input
7 20 6
Output
1 6
Explanation
Because , the whole list fits on page , and item is at position .