Ticket 15201
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
165729995 196106527 259418275 306047234 338900956 700151252 833973717 875266362 949008791 961586431 
1000000000000000
Expected Output
915
Generator Parameters
--m_high 1000000000000000 --m_low 1000000000000000 --n_high 10 --n_low 10 --val_high 1000000000 --val_low 1