Problem4531--等差数列的判定

4531: 等差数列的判定

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MiB

Description

给定 lns="http://www.w3.org/1998/Math/MathML">n 个整数 lns="http://www.w3.org/1998/Math/MathML">a1,a2,,an,请判定给的数列是否是一个等差数列。

所谓等差数列就是相邻数之差恒等。


提示:

  1. 先排序(因为输入的数列可能是乱序的)。

  2. 计算相邻两项的差。

  3. 如果所有相邻项的差都相等,那么它是等差数列。

注意:

  • 如果 n == 1 或 n == 2,应当视为等差数列。

  • 差值必须是常数,不能变化。

Input


  • 第一行:单个整数表示 lns="http://www.w3.org/1998/Math/MathML">n
  • 第二行:lns="http://www.w3.org/1998/Math/MathML">n 个整数表示 lns="http://www.w3.org/1998/Math/MathML">a1,a2,,an

  •  的数据,lns="http://www.w3.org/1998/Math/MathML">1n100
  • lns="http://www.w3.org/1998/Math/MathML">100% 的数据,lns="http://www.w3.org/1998/Math/MathML">1n100,000
  • lns="http://www.w3.org/1998/Math/MathML">1,000,000,000ai1,000,000,000



Output

  • 若是输入构成等差数列,输出 Arithmetic Sequence
  • 否则,输出 No

Sample Input Copy

5
1 3 5 7 9

Sample Output Copy

Arithmetic Sequence

Source/Category