結果

問題 No.1594 Three Classes
ユーザー sho13_0224
提出日時 2021-07-09 23:06:19
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 253 bytes
コンパイル時間 1,484 ms
コンパイル使用メモリ 167,616 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-01 18:11:14
合計ジャッジ時間 2,271 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
int main(){
	int n;
	cin >> n;
	vector<int> e(n);
	for(int i = 0; i < n; i++) cin >> e[i];
	int sum = accumulate(e.begin(), e.end(), 0);
	if(sum % 3 == 0) cout << "Yes" << endl;
	else cout << "No" << endl;
}
0