Ticket 8450
Problem 1651 -c
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
1
3
100510269 961669078 334632474 
540719523 783131365 17569178 
Expected Output
289028140
Generator Parameters
--n_high 3 --n_low 3 --t_high 1 --t_low 1 --val_high 1000000000 --val_low 1