結果

問題 No.2451 Redistribute Integers
ユーザー titiatitia
提出日時 2023-09-01 21:38:26
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 257 ms / 2,000 ms
コード長 210 bytes
コンパイル時間 253 ms
コンパイル使用メモリ 10,624 KB
実行使用メモリ 66,288 KB
最終ジャッジ日時 2023-09-01 21:38:30
合計ジャッジ時間 3,824 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,760 KB
testcase_01 AC 15 ms
8,132 KB
testcase_02 AC 15 ms
7,736 KB
testcase_03 AC 15 ms
7,804 KB
testcase_04 AC 202 ms
64,644 KB
testcase_05 AC 15 ms
7,760 KB
testcase_06 AC 15 ms
7,792 KB
testcase_07 AC 15 ms
7,804 KB
testcase_08 AC 160 ms
66,288 KB
testcase_09 AC 16 ms
7,708 KB
testcase_10 AC 15 ms
7,860 KB
testcase_11 AC 15 ms
7,792 KB
testcase_12 AC 99 ms
27,672 KB
testcase_13 AC 225 ms
62,748 KB
testcase_14 AC 193 ms
65,652 KB
testcase_15 AC 117 ms
35,492 KB
testcase_16 AC 89 ms
32,300 KB
testcase_17 AC 204 ms
51,400 KB
testcase_18 AC 221 ms
62,840 KB
testcase_19 AC 32 ms
15,252 KB
testcase_20 AC 135 ms
51,384 KB
testcase_21 AC 257 ms
62,468 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N=int(input())
A=list(map(int,input().split()))

if sum(A)%N!=0:
    print("No")
    exit()

B=[a%N for a in A]

if len(set(B))==1:
    print("Yes")
else:
    print("No")
0