【发布时间】:2018-03-12 09:42:37
【问题描述】:
根据以下链接中所述的问题:
我的代码在 Mac OSX 终端中运行良好,但是在 Hackerrank 中提交相同的代码时,其中一个测试用例失败了。我不确定为什么会这样。非常感谢任何答案。
read X
read Y
if [[ $X > $Y ]]
then
echo "X is greater than Y"
elif [[ $X < $Y ]]
then
echo "X is less than Y"
else
echo "X is equal to Y"
fi
HackerRank Custom Test Case:
Compilation Successful
Input (stdin)
-100
100
Your Output
X is greater than Y
【问题讨论】: