#180. 检查相邻满分
检查相邻满分
Adjacent 100 Scores
Background
Congcong recently took a series of exams. He wants to know if there are any instances where he scored a perfect 100 twice in a row.
Problem Description
Given an array of integers representing a series of exam scores, return true if there are two adjacent elements in the array that are both ; otherwise, return false. The array length is guaranteed to be at least .
Input Format
Input is given from standard input in the following format.
A single line containing multiple space-separated integers, representing the exam scores.
Output Format
Output is printed to standard output in the following format.
Output
trueif there are adjacent scores; otherwise, outputfalse.
Sample
1 100 100
true
1 100 99 100
false
100 1 100 100
true
Sample Explanation
Sample 1: The array is [1, 100, 100]. At indices and , there are two adjacent scores, so true is returned.
Sample 2: The array is [1, 100, 99, 100]. There are no adjacent scores, so false is returned.
Sample 3: The array is [100, 1, 100, 100]. At indices and , there are two adjacent scores, so true is returned.
Constraints
- Array length .
- Each score satisfies .
- Time limit: second, Memory limit: KiB.