結果
問題 |
No.1586 Equal Array
|
ユーザー |
|
提出日時 | 2021-07-09 18:14:59 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 16 ms / 1,000 ms |
コード長 | 367 bytes |
コンパイル時間 | 451 ms |
コンパイル使用メモリ | 64,344 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-01 14:02:07 |
合計ジャッジ時間 | 1,558 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include<iostream> using namespace std; typedef long long ll; const int N = 1e5+10; ll sum; int a[N]; int main() { // ios::sync_with_stdio(false); // cout.tie(0); int n; scanf("%d",&n); for(int i = 0;i<n;i++) { scanf("%d",&a[i]); sum+=a[i]; } if(sum%n == 0)printf("Yes\n"); else printf("No\n"); return 0; }