Ticket 8448
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
982026302 425531152 283346071 
611286145 41752582 816797767 
Expected Output
493168609
Generator Parameters
--n_high 3 --n_low 3 --t_high 1 --t_low 1 --val_high 1000000000 --val_low 1