|
|
back to boardMy solution works as follows : For each x (x=0,1,2,..,n-1) (x is horizontal axis) find y0=x*tg(a) and y1=(x+1)*tg(a), where tg(a) is (m-1)/(n-1). Add to answer floor (y1) - floor(y0) +1. If y1 is a whole number then subtract 1 from answer. |
|
|