Hi. I've been struggling to solve [this](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2868) problem from UVA.↵
↵
It asks for the number of lattice points ( points with integer co-ordinates ) on a given line segment. But the endpoints on the segment can be fractions. I'll appreciate it a lot if someone tells me how this problem can be solved.
↵
It asks for the number of lattice points ( points with integer co-ordinates ) on a given line segment. But the endpoints on the segment can be fractions. I'll appreciate it a lot if someone tells me how this problem can be solved.