結果

問題 No.970 数列変換マシン
ユーザー ui_mtcui_mtc
提出日時 2020-01-24 19:13:28
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 41 ms / 2,000 ms
コード長 337 bytes
コンパイル時間 1,567 ms
コンパイル使用メモリ 168,624 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-14 03:46:34
合計ジャッジ時間 3,173 ms
ジャッジサーバーID
(参考情報)
judge4 / judge6
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

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


signed main() {
  int N;
  cin >> N;
  
  vector<int> A(N);
  int total = 0;
  for( int i = 0; i < N; i++ ){
    cin >> A.at(i);
    total += A.at(i);
  }
  
  for( int i = 0; i < N; i++ ){
    cout << total - (N-1)*A.at(i) << " ";
  }
  cout << endl;
    
    
}
  
0