結果
| 問題 | 
                            No.1586 Equal Array
                             | 
                    
| コンテスト | |
| ユーザー | 
                             norioc
                         | 
                    
| 提出日時 | 2021-07-08 22:30:59 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 77 ms / 1,000 ms | 
| コード長 | 254 bytes | 
| コンパイル時間 | 88 ms | 
| コンパイル使用メモリ | 12,416 KB | 
| 実行使用メモリ | 21,684 KB | 
| 最終ジャッジ日時 | 2024-07-01 12:50:22 | 
| 合計ジャッジ時間 | 2,276 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 20 | 
ソースコード
input()
a = list(map(int, input().split()))
def calc(a) -> bool:
    s = sum(a)
    if s % len(a) != 0: return False
    m = s // len(a)
    x = 0
    for e in a:
        x += e - m
    return x == 0
if calc(a):
    print('Yes')
else:
    print('No')
            
            
            
        
            
norioc