Id1858
TitleNatural Span
Tagsmath
Brief solution由于a,b互素,所以x>a*b-a-b那么一定存在SPan{a,b}中。在此优化下,解决其它case就很容易了。
time usage:1.095062