Ticket 15200
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
46750577 89507384 235133170 481496123 561124981 630914397 761601992 860857154 923050954 937205415 
1000000000000000
Expected Output
869
Generator Parameters
--m_high 1000000000000000 --m_low 1000000000000000 --n_high 10 --n_low 10 --val_high 1000000000 --val_low 1