結果

問題 No.970 数列変換マシン
ユーザー arupakawaiii
提出日時 2020-01-28 04:42:51
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 274 bytes
コンパイル時間 1,780 ms
コンパイル使用メモリ 166,148 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-14 22:14:54
合計ジャッジ時間 3,847 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 3 WA * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main() {
  ll n;
  cin>>n;
  ll a[n];
  for(int i=0;i<n;++i){
    cin>>a[i];
  }
  
  ll sum=0;
  for(int i=0;i<n;++i)sum+=a[i];

  for(int i=0;i<n;++i){
    cout<<sum-2*a[i]<<" ";
  }
  cout<<endl;
}
0