#120. 条件求和
条件求和
Special Sum
Background
Dawei is teaching Congcong basic arithmetic operations. To make it more interesting, Dawei gave Congcong a special sum problem.
Problem Description
Given two integers and , return their sum. However, if the sum is in the range to (inclusive), the actual sum is forbidden. In that case, return . Otherwise, return the actual sum.
Input Format
Input is given from Standard Input in the following format.
Two integers and , separated by a space.
Output Format
Output to Standard Output in the following format.
An integer representing the sum calculated according to the rules.
Sample
3 4
7
9 4
20
10 11
21
Sample Explanation
- Sample 1: . Since is not in the range to , return .
- Sample 2: . Since is in the range to , return .
- Sample 3: . Since is not in the range to , return .
Constraints
For all test cases: Time limit: 1s Memory limit: 1024KB