I solved this question below in a public contest and I don't know why one of the examiners gave me 12/15 points.
Question: If $a<b\in\mathbb R$ and $f:[a,b]\to \mathbb R$ a real function, continuous in $[a,b]$ and derivable in $(a,b)$. Show if $f'(x)=0$, for every $x\in (a,b)$, then there is $k\in \mathbb R$, such that $f(x)=k$, for every $x\in [a,b]$.
Solution: Let $h>0$ such that $a+h<b$. Applying the Mean Value Theorem in $[a+h,b]$, there is a $c\in(a+h,b)$ such that
$$f'(c)=\frac{f(b)-f(a+h)}{b-a-h}=0$$
It follows $f(a+h)=f(b)$ which also follows $f$ is constant $f(x)=k$ with $k=f(b)$.
The only mistake I found was forgetting to prove $f(a)=k$, are there other mistakes? I don't understand why I got only 80% of this question.