Ticket 15202
Problem 1661 -f
View hacks & all small testcases

Unable to dry run this testcase?
Try making a new request with small values of n_high, t_high, *_high, etc.


Retry
Input
10
71302257 160867729 375446742 474587506 582396824 604043810 655137532 727459602 905469589 977187601 
1000000000000000
Expected Output
945
Generator Parameters
--m_high 1000000000000000 --m_low 1000000000000000 --n_high 10 --n_low 10 --val_high 1000000000 --val_low 1