結果

問題 No.970 数列変換マシン
ユーザー evawenisevawenis
提出日時 2020-06-18 01:43:39
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 24 ms / 2,000 ms
コード長 311 bytes
コンパイル時間 2,223 ms
コンパイル使用メモリ 194,124 KB
最終ジャッジ日時 2025-01-11 05:04:18
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

int main(){
	cin.tie(0),ios::sync_with_stdio(false);
	int n; cin>>n;
	vector<int>y(n); for(auto&&i:y)cin>>i;
	int64_t sum=accumulate(y.begin(),y.end(),0L);
	cout<<sum-y.front()*(n-1);
	for(int i=1;i<y.size();++i){
		cout<<" "s<<sum-y.at(i)*(n-1);
	}
	cout<<"\n"s;
}
0