Problem Statement
Given eight integers
S1,S2,…, and S8, print Yes if they satisfy all of the following three conditions, and No otherwise.
(资料图)
The sequence (S1,S2,…,S8) is monotonically non-decreasing. In other words,
S1≤S2≤⋯≤,S2,…, and S8 are all between 100 and 675, inclusive.
S1,S2,…, and S8 are all multiples of 25.
Constraints 0≤Si ≤1000
All input values are integers.
Input
The input is given from Standard Input in the following format:
S1 S2 … S8
Output
Print the answer.
Sample Input 1
125 175 250 300 400 525 600 650
Sample Output 1
Yes
They satisfy all of the three conditions.
Sample Input 2
100 250 300 400 325 575 625 675
Sample Output 2
No
They violate the first condition because
S4>S5.
Sample Input 3
0 23 24 145 301 413 631 632
Sample Output 3
No
They violate the second and third conditions.
-----------------------------------------------------
Easy 题目,判断所有所有是否满足三个条件即可,只是3个条件分开写一个函数即可;
下面是代码:
Copyright © 2015-2022 南非导购网版权所有 备案号:沪ICP备2022005074号-13 联系邮箱:58 55 97 3@qq.com