結果

問題 No.1586 Equal Array
ユーザー momoyuu
提出日時 2024-08-08 15:16:19
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 12 ms / 1,000 ms
コード長 351 bytes
コンパイル時間 1,019 ms
コンパイル使用メモリ 91,220 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-08-08 15:16:22
合計ジャッジ時間 2,315 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<vector>
#include<algorithm>

using namespace std;
using ll = long long;

int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    int n;
    cin>>n;
    ll sum = 0;
    for(int i = 0;i<n;i++){
        ll a;
        cin>>a;
        sum += a;
    }
    if(sum%n==0) cout<<"Yes\n";
    else cout<<"No\n";
}   

0