103240: [Atcoder]ABC324 A - Same
Memory Limit:256 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:6
Solved:0
Description
Score : $100$ points
Problem Statement
You are given $N$ integers $A _ 1,A _ 2,\ldots,A _ N$.
If their values are all equal, print Yes
; otherwise, print No
.
Constraints
- $2\leq N\leq100$
- $1\leq A _ i\leq100\ (1\leq i\leq N)$
- All input values are integers.
Input
The input is given from Standard Input in the following format:
$N$ $A _ 1$ $A _ 2$ $\ldots$ $A _ N$
Output
Print a single line containing Yes
if the values of the given $A _ 1,A _ 2,\ldots,A _ N$ are all equal, and No
otherwise.
Sample Input 1
3 3 2 4
Sample Output 1
No
We have $A _ 1\neq A _ 2$, so you should print No
.
Sample Input 2
4 3 3 3 3
Sample Output 2
Yes
We have $A _ 1=A _ 2=A _ 3=A _ 4$, so you should print Yes
.
Sample Input 3
10 73 8 55 26 97 48 37 47 35 55
Sample Output 3
No
Output
得分:100分
问题描述
给你 $N$ 个整数 $A _ 1,A _ 2,\ldots,A _ N$。
如果它们的值都相等,输出 Yes
;否则,输出 No
。
约束条件
- $2\leq N\leq100$
- $1\leq A _ i\leq100\ (1\leq i\leq N)$
- 所有输入值都是整数。
输入
输入通过标准输入给出以下格式:
$N$ $A _ 1$ $A _ 2$ $\ldots$ $A _ N$
输出
如果给定的 $A _ 1,A _ 2,\ldots,A _ N$ 的值都相等,输出一行 Yes
,否则输出 No
。
样例输入 1
3 3 2 4
样例输出 1
No
我们有 $A _ 1\neq A _ 2$,所以你应该输出 No
。
样例输入 2
4 3 3 3 3
样例输出 2
Yes
我们有 $A _ 1=A _ 2=A _ 3=A _ 4$,所以你应该输出 Yes
。
样例输入 3
10 73 8 55 26 97 48 37 47 35 55
样例输出 3
No
HINT
判断n个数是否相等?