|Online MIPT programming contest||РУССКИЙ|
Time limit = 5 second(s)The strange tower have infinite number of stores and rooms. The first store has one room, next two stores have two rooms each, next three stores have three rooms each, ...
The tower is provided with lift. But inhabitants enconter the following problem: how to get store number and room position on the store given room number?
Input Room number N. 1 ≤ N ≤ 2 000 000 000.
Output Two integers delimited with space: store number and order number from the left.
© acm.mipt DevGroup
The page was generated in 210ms