Ticket 13830
Problem 1679 -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
498 1
2 4
Expected Output
130508919
Generator Parameters
3 1 7 9