Problem

Source: XI International Festival of Young Mathematicians Sozopol 2022, Theme for 11-12 grade

Tags: surjective function, function problem, algebra



Does there exist a surjective function $f:\mathbb{R} \rightarrow \mathbb{R}$ for which $f(x+y)-f(x)-f(y)$ takes only 0 and 1 for values for random $x$ and $y$?