Comment by tgv
You have to find the integers that fulfill a certain condition best. That's fundamentally different from real numbers. It looks exactly like other numerical problems, but there's no general solution for it, only (very good) heuristics for specific classes.
Even continuous linear programming wasn't known to be in P-time until the 1980s or so.