
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
Given the function $f(x)=\left\{\begin{array}{l}\sqrt{x},(0≤x＜n)\\{(x-1)}^{2},(x≥n)\end{array}\right.$, where $n \gt 1$. If there exists a real number $b$ such that the equation $f\left(x\right)=b$ has two distinct real roots with respect to $x$.  
$(1)$ Find the integer value of $n$;  
$(2)$ Let $g\left(x\right)=x^{2}+a|x-n|$, where $n$ takes the integer value found in $(1)$. If $g\left(x\right)$ is monotonically increasing on $\left[0,+\infty \right)$, find the range of real numbers for $a$.

Present the answer in LaTex format: \boxed{Your answer}
user