結果

問題 No.406 鴨等間隔の法則
ユーザー LEDLED
提出日時 2019-02-01 14:38:24
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 106 bytes
コンパイル時間 81 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 23,424 KB
最終ジャッジ日時 2024-05-01 22:51:11
合計ジャッジ時間 5,324 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 115 ms
15,488 KB
testcase_01 AC 86 ms
12,160 KB
testcase_02 AC 86 ms
12,416 KB
testcase_03 AC 88 ms
12,416 KB
testcase_04 AC 149 ms
19,456 KB
testcase_05 AC 109 ms
14,848 KB
testcase_06 AC 113 ms
14,848 KB
testcase_07 AC 112 ms
14,848 KB
testcase_08 AC 149 ms
19,328 KB
testcase_09 AC 154 ms
19,968 KB
testcase_10 AC 115 ms
15,360 KB
testcase_11 AC 143 ms
18,432 KB
testcase_12 AC 121 ms
16,256 KB
testcase_13 AC 121 ms
16,000 KB
testcase_14 AC 149 ms
22,016 KB
testcase_15 AC 92 ms
12,544 KB
testcase_16 AC 95 ms
12,416 KB
testcase_17 AC 91 ms
12,288 KB
testcase_18 AC 91 ms
12,416 KB
testcase_19 AC 92 ms
12,800 KB
testcase_20 AC 95 ms
13,184 KB
testcase_21 AC 96 ms
12,800 KB
testcase_22 AC 105 ms
14,592 KB
testcase_23 AC 122 ms
16,384 KB
testcase_24 AC 146 ms
21,120 KB
testcase_25 AC 155 ms
20,352 KB
testcase_26 WA -
testcase_27 AC 145 ms
20,480 KB
testcase_28 AC 142 ms
20,224 KB
testcase_29 WA -
testcase_30 AC 161 ms
23,424 KB
testcase_31 AC 150 ms
19,712 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n=gets.to_i
x=gets.split.map(&:to_i).sort
puts x.inject{|s,l|s+l%n}%n==0 && x.uniq.size==n ? "YES" : "NO"
0