Problem

Source: INMO Problem 3

Tags: algebra, floor function



Find the number of triples $(x,a,b)$ where $x$ is a real number and $a,b$ belong to the set $\{1,2,3,4,5,6,7,8,9\}$ such that $$x^2-a\{x\}+b=0.$$where $\{x\}$ denotes the fractional part of the real number $x$.