結果

問題 No.2451 Redistribute Integers
ユーザー simansiman
提出日時 2023-09-04 09:10:36
言語 Ruby
(3.3.0)
結果
AC  
実行時間 438 ms / 2,000 ms
コード長 119 bytes
コンパイル時間 417 ms
コンパイル使用メモリ 11,212 KB
実行使用メモリ 59,476 KB
最終ジャッジ日時 2023-09-04 09:10:44
合計ジャッジ時間 6,995 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
15,052 KB
testcase_01 AC 81 ms
15,048 KB
testcase_02 AC 81 ms
15,000 KB
testcase_03 AC 81 ms
15,328 KB
testcase_04 AC 414 ms
59,476 KB
testcase_05 AC 80 ms
15,096 KB
testcase_06 AC 80 ms
15,156 KB
testcase_07 AC 84 ms
15,256 KB
testcase_08 AC 309 ms
57,184 KB
testcase_09 AC 80 ms
15,312 KB
testcase_10 AC 81 ms
15,148 KB
testcase_11 AC 81 ms
15,048 KB
testcase_12 AC 182 ms
28,624 KB
testcase_13 AC 438 ms
58,736 KB
testcase_14 AC 417 ms
59,244 KB
testcase_15 AC 238 ms
35,916 KB
testcase_16 AC 210 ms
33,444 KB
testcase_17 AC 292 ms
45,028 KB
testcase_18 AC 405 ms
58,744 KB
testcase_19 AC 104 ms
17,932 KB
testcase_20 AC 302 ms
46,824 KB
testcase_21 AC 398 ms
57,696 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N = gets.to_i
A = gets.split.map(&:to_i).sort

if A.all? { |a| (a - A[0]) % N == 0 }
  puts 'Yes'
else
  puts 'No'
end
0