Functional equation $f(\lfloor x \rfloor y)=f(x)f(\lfloor y\rfloor)$ 
Determine all function $f:\mathbb{R}\rightarrow \mathbb{R}$ such that the equality $f(\lfloor x \rfloor y)=f(x)f(\lfloor y\rfloor)$ holds for all $x,y\in\mathbb{R}$ (where $\lfloor x\rfloor$ is a floor function of $x$)

Try: 
 $f(\lfloor x \rfloor y)=f(x)f(\lfloor y\rfloor)$
Put $x=y=0$, we have $f(0)= f(0)\lfloor f(0)\rfloor$
We have $f(0)=0$ or $\lfloor f(0)\rfloor =1$
Could some help me to solve it, Thanks
 A: Hint: Take $0\leq x<1$. Letting $y$ vary, what do you get? You are going to want to keep the cases $f(0)=0$ and $f(0)\neq 0$ separate.
A: The answer is $f$ satisfies the given property if and only if $\exists a_n, n \in \mathbb Z$ such that $f(x)=a_n$ for $n \leq x <n+1$ $(n \in \mathbb Z)$ and $a_{nm} =a_na_m$. Given $f$ as stated let $a_n =f(n)$ and note thta $a_{nm}=f(nm)=f(n)f(m)$ (by taking $x=n,y=n) =a_na_m$. Conversely given a multiplicative $a_n$'s define $f(x)=a_n$ if $n \leq x <n+1$ and you see that $f$ satisfies the required property.  Of course, there are many mutiplicative sequences and they all give functions with the desired property.
A: As you say, $f(0) = f(0)^{2}$, so $f(0) = 0$ or $f(0) = 1$. \
Case 1: $f(0) = 0$
Let $t$ be a positive real number, and $N$ an integer greater than $t$. Then:
$$f(\lfloor N \rfloor (t/N)) = f(N)f(\lfloor t/N\rfloor)$$
$$\Rightarrow f(t) = f(N)f(0) = 0$$
Similarly for $t < 0$ we can make the same argument with $N$ a negative integer less than $t$. So $f(t) = 0$ for all $t$.
Case 2: $f(0) = 1$
Using the same argument as part $1$, if $t > 0$ and $N$ is an integer greater than $t$, then $f(t) = f(N)f(0) = f(N)$. So if $t_1,t_2$ are positive and $N$ is an integer greater than both, $f(t_1) = f(N) = f(t_2)$. If $x = y = 1/2$ we get $f(0) = f(1/2)f(0)$, i.e. $f(1/2) = 1$, so $f(t) = 1$ for all $t > 0$. If $t < 0$ and $N$ is an integer less than $t$, $f(t) = f(N)f(0) = f(N)$, so $f$ is constant less than zero as well. If $x = y = -1$, we get $f(1) = f(-1)^{2}$. You actually get two options here: the first is $f(t) = 1$ for all $t$ and the second is:
$$f(x) = \left\{\begin{array}{cc} 1 & x \geq 0 \\ -1 & x < 0 \end{array}\right.$$
