Payment Without Change

Revision en1, by luyiming123, 2019-12-08 02:55:07

这可以说是一道数论(? 首先可以发现$x$的取值为$[0,min(a,S/n)]$,$$$y$$$的取值为$$$S-xn$$$ $$$x$$$的取值最大为$$$min(a,S/n)$$$,得$$$y$$$的取值为$$$S-min(a,S/n)n$$$ 只要判断$y$是否小于等于$b$就好了

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English luyiming123 2019-12-08 02:55:07 146 Initial revision (published)