A function $f:X\to X$ on a group $X$ is called a polynomial if there exists $n\in\mathbb N=\{1,2,\dots\}$ and elements $a_0,a_1,\dots,a_n\in X$ such that $f(x)=a_0xa_1x\cdots xa_n$ for all $x\in X$. The smallest number $n\in\mathbb N$ in such a representation is called the degree of the polynomial $X$.
The constant function $1_X:X\to\{1\}\subseteq X$ on a finite group $X$ is a polynomial of degree $\le\exp(X):=\min\{n\in\mathbb N:\forall x\in X\;\;(x^n=1)\}$ because $f(x)=1=x^{\exp(X)}$ for any $x\in X$.
Each polynomial $f$ on a commutative group $X$ is of form $f(x)=ax^n$ for some $a\in X$ and $n\le\exp(X)$, which implies that $\deg(1_X)=\exp(X)$ for any finite commutative group $X$.
Problem 1. Given a non-commutative finite group $X$, calculate (or evaluate) the degree $\deg(1_X)$ of the constant polynomial $1_X:X\to\{1\}\subseteq X$.
Remark 1. Calculations in GAP show that for any non-commutative group $X$ of order $|X|<20$, except for $A_4$ and $C_3\times S_3$, the degree of the constant function $1_X$ is equal $4$. For the groups $A_4$ and $C_3\times S_3$ this degree equals $6$.
Remark 2. It can be shown that $\deg(1_X)=4$ for any dihedral group $X=D_{2n}$ (because for any non-central element $b$ of order $2$ in $D_{2n}$ we have $bxxbxx=1$ for all $x\in D_{2n}$).
Remark 3. It is easy to see that $\deg(1_X)\ge \exp(Z(X))$, where $Z(X)=\{z\in X:\forall x\in X\;\;(xz=zx)\}$ is the center of $X$.
Keith Kearnes in his comment observed that $\deg(1_X)\ge\deg(1_{X/N})\ge\exp(Z(X/N))$ for any normal subgroup $N$ of $X$. In particular, $\deg(1_X)\ge \exp(X/[X,X])$.
Problem 2. What can be said about the degree of the constant polynomial $1_X$ on a finite simple group $X$. Is $\deg(1_X)=\exp(X)$? Is this equality true for the simple group $X=A_5$?
Remark 4. It seems that this problem has been considered by various authors in the contexts of strong laws on groups. In particular, by Corollary 1 in this paper of Schneider and Thom, for the symmetric group $X=S_n$ we have $\deg(1_X)\ge \frac{n}4$, which implies that the alternating group $X=A_n$ has $\deg(1_X)\ge\frac{n}8$.