#K105. 乘着列车,出发喽! (Train to the Paradise)
乘着列车,出发喽! (Train to the Paradise)
Warning: This question strictly requires the use of C/C++ language for answering, and Python is prohibited from use. The numbers and output results that appear during the calculation process of this question may not be represented by long long int
or unsigned long int
because they can be too large, but it can be guaranteed that all results can be represented as an integer of no more than decimal bits.
Background
Mr. Sha from ShanghaiTech University felt that his life was too boring, so he established a paradise in an unknown place in the universe and built a track connecting the university and the paradise. On the track, there was a commuter train from the university to the paradise. After multiple track repairs, trains departed from the university one after another, carrying classmates who thought similarly to Mr. Sha, heading towards the paradise filled with eternal hope and happiness.
The st train departs in the th minute. minutes later, the nd train departed. Another minutes passed, and the rd train departed. After another minutes, the th train departed. Starting from the th train, the interval between the -th train and the -th train is the same as the interval between the -th train and the -th train. Mr. Sha wants to know the departure time of the -th train to ensure that he can arrive at the station on time for boarding.
Description
Input a positive integer , output the interval between the -th train and the st train.
Format
Input
A positive integer .
Output
Another positive integer , satisfying that the interval between the -th train and the st train is minutes.
Samples
5
26
The th train departs at the th minutes after the st train departs, because .
Limitation
1s, 1024KiB for each test case.