#285. 判断整数是否接近100或200

    ID: 285 Type: Default 1000ms 256MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>codingbatWarmup-1gesp1条件结构数学基础

判断整数是否接近100或200

Close to 100 or 200

Background

Congcong has recently been studying the properties of numbers. He wants to know if a given integer is "close" to a specific value.

Problem Description

Given an integer nn, return true if it is within 1010 of 100100 (i.e., n10010|n - 100| \le 10) or within 1010 of 200200 (i.e., n20010|n - 200| \le 10). Otherwise, return false. Note: Math.abs(num) computes the absolute value of a number.

Input Format

Input is given from Standard Input in the following format.

An integer nn.

Output Format

Output is to Standard Output in the following format.

Output true if the condition is met, otherwise output false.

Sample

93
true
90
true
89
false

Sample Explanation

For the sample input 9393, since 93100=7=710|93 - 100| = |-7| = 7 \le 10, the condition is met, and true is output.

Constraints

nn is an integer, its value is within the range of standard integer types. Time limit: 11 second, Memory limit: 10241024 MiB.