No.383 Rating
Problem Statement
In a certain programming contest, A's rating changed from $a$ to $b$. To tweet about this rating change, A often uses the notation
$a$ → $b$($s$)
Here, $s$ is a string determined as follows.
・If the rating did not change, "0"
・If the rating increased, the character "+" followed by the amount of the rating change
・If the rating decreased, the character "-" followed by the amount of the rating change
A is bad at subtraction and often gets $s$ wrong. Work out $s$ on behalf of A.
Input
$a$ $b$
The first line contains A's rating before the contest $a$ and rating after the contest $b$.
0 ≤ $a$, $b$ < 4000
Output
Output the string representing the rating change.
Print a newline at the end.
Sample
Sample 1
Input
1200 1350
Output
+150
When the rating increases, do not forget the "+".
Sample 2
Input
1350 1200
Output
-150
The rating can also decrease. Alas.
Sample 3
Input
1500 1500
Output
0
The rating may also stay unchanged. In this case, write neither "+" nor "-".
Sample 4
Input
2179 2218
Output
+39
Congratulations on becoming a red coder.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
mayoko_