結果

問題 No.1389 Clumsy Calculation
ユーザー chestnut_68
提出日時 2021-02-14 21:05:07
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 89 ms / 2,000 ms
コード長 223 bytes
コンパイル時間 1,339 ms
コンパイル使用メモリ 167,108 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-22 08:15:49
合計ジャッジ時間 3,850 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
const int64_t MOD=1e9+7;
int main(){
  int64_t N,X,S=0;cin>>N>>X;
  rep(i,N){
    int64_t A;
    cin>>A;
    S+=A;
  }
  cout<<S-X*(N-1);
}
0