結果

問題 No.2451 Redistribute Integers
ユーザー ikomaikoma
提出日時 2023-09-01 23:05:07
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 226 ms / 2,000 ms
コード長 243 bytes
コンパイル時間 333 ms
コンパイル使用メモリ 87,108 KB
実行使用メモリ 174,476 KB
最終ジャッジ日時 2023-09-01 23:05:13
合計ジャッジ時間 4,885 ms
ジャッジサーバーID
(参考情報)
judge12 / judge16
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,300 KB
testcase_01 AC 69 ms
71,596 KB
testcase_02 AC 82 ms
71,460 KB
testcase_03 AC 69 ms
71,492 KB
testcase_04 AC 201 ms
152,132 KB
testcase_05 AC 73 ms
71,508 KB
testcase_06 AC 70 ms
71,412 KB
testcase_07 AC 74 ms
71,388 KB
testcase_08 AC 156 ms
149,384 KB
testcase_09 AC 73 ms
71,164 KB
testcase_10 AC 71 ms
71,656 KB
testcase_11 AC 74 ms
71,300 KB
testcase_12 AC 152 ms
100,352 KB
testcase_13 AC 198 ms
174,476 KB
testcase_14 AC 199 ms
152,204 KB
testcase_15 AC 137 ms
113,112 KB
testcase_16 AC 127 ms
104,952 KB
testcase_17 AC 196 ms
167,508 KB
testcase_18 AC 182 ms
145,804 KB
testcase_19 AC 104 ms
82,916 KB
testcase_20 AC 153 ms
136,900 KB
testcase_21 AC 226 ms
159,368 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

def solve():
    N=int(input())
    A=list(map(int,input().split()))
    sumA = sum(A)
    if sumA%N!=0:
        return False
    return len(set([a % N for a in A]))==1


print("Yes" if solve() else "No")
0