Module: 条件运算符


Problem

11 /17


方程组

Problem

编写一个程序来使用公式计算 y

\(\begin{equation*} y(x) = \begin{cases} 0 &\text{x = 0}\\ x^2-x-1 &\ text{otherwise} \end{cases} \end{equation*}\)

输入
输入是一个整数x

印记
显示y的值。
 
例子
<头> <正文>
# 输入 输出
1 2 1