結果
問題 | No.406 鴨等間隔の法則 |
ユーザー | minezumu |
提出日時 | 2018-07-23 14:59:21 |
言語 | Python3 (3.11.6 + numpy 1.26.0 + scipy 1.11.3) |
結果 |
WA
|
実行時間 | - |
コード長 | 322 bytes |
コンパイル時間 | 141 ms |
コンパイル使用メモリ | 10,708 KB |
実行使用メモリ | 19,172 KB |
最終ジャッジ日時 | 2023-08-27 16:57:33 |
合計ジャッジ時間 | 4,080 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 14 ms
7,836 KB |
testcase_02 | AC | 13 ms
7,784 KB |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | AC | 87 ms
17,136 KB |
testcase_15 | WA | - |
testcase_16 | AC | 18 ms
8,940 KB |
testcase_17 | AC | 16 ms
8,508 KB |
testcase_18 | AC | 19 ms
8,852 KB |
testcase_19 | AC | 21 ms
8,992 KB |
testcase_20 | AC | 23 ms
9,512 KB |
testcase_21 | AC | 24 ms
9,932 KB |
testcase_22 | AC | 32 ms
10,772 KB |
testcase_23 | WA | - |
testcase_24 | AC | 74 ms
15,900 KB |
testcase_25 | WA | - |
testcase_26 | AC | 101 ms
19,000 KB |
testcase_27 | WA | - |
testcase_28 | WA | - |
testcase_29 | AC | 101 ms
19,052 KB |
testcase_30 | AC | 97 ms
18,804 KB |
testcase_31 | WA | - |
ソースコード
N = int(input()) X = list(map(int,input().split())) X = sorted(X) D = [] for i in range(N-1) : if X[i+1] - X[i] != 0 : d = X[i+1] - X[i] D.append(d) else : print("NO") if len(D) != 0 : checker = D[0] if N-1 == D.count(checker) : print("YES") else : print("NO")