A - Signed Difficulty
解説
/
実行時間制限: 2 sec / メモリ制限: 1024 MB
配点 : 100 点
問題文
実数 X.Y が与えられます。ただし Y はちょうど 1 桁です。
- 0 \leq Y \leq 2 ならば、X-
- 3 \leq Y \leq 6 ならば、X
- 7 \leq Y \leq 9 ならば、X+
と出力してください。
制約
- 1 \leq X \leq 15
- 0 \leq Y \leq 9
- X と Y は整数
入力
入力は以下の形式で標準入力から与えられる。
X.Y
出力
答えを出力せよ。
入力例 1
15.8
出力例 1
15+
15 +
のような出力は不正解とみなされます。
X と +
の間や、X と -
の間には空白を入れずに出力してください。
入力例 2
1.0
出力例 2
1-
1.00
や 1
などの値が入力として与えられることはありません。
入力例 3
12.5
出力例 3
12
Score : 100 points
Problem Statement
You are given a real number X.Y, where Y is a single digit.
Print the following: (quotes for clarity)
- X-, if 0 \leq Y \leq 2;
- X, if 3 \leq Y \leq 6;
- X+, if 7 \leq Y \leq 9.
Constraints
- 1 \leq X \leq 15
- 0 \leq Y \leq 9
- X and Y are integers.
Input
Input is given from Standard Input in the following format:
X.Y
Output
Print the answer.
Sample Input 1
15.8
Sample Output 1
15+
Here, printing 15 +
will not be accepted: do not print a space between X and +
, or between X and -
.
Sample Input 2
1.0
Sample Output 2
1-
You will not get inputs such as 1.00
and 1
.
Sample Input 3
12.5
Sample Output 3
12