結果
| 問題 | 
                            No.1389 Clumsy Calculation
                             | 
                    
| コンテスト | |
| ユーザー | 
                             umezo
                         | 
                    
| 提出日時 | 2021-02-12 22:15:15 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 89 ms / 2,000 ms | 
| コード長 | 311 bytes | 
| コンパイル時間 | 1,916 ms | 
| コンパイル使用メモリ | 193,540 KB | 
| 最終ジャッジ日時 | 2025-01-18 18:44:15 | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 26 | 
ソースコード
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
typedef long long ll;
#include <bits/stdc++.h>
using namespace std;
int main(){
  ll n,x;
  cin>>n>>x;
  vector<ll> S(n);
  rep(i,n) cin>>S[i];
  
  ll sum=0;
  rep(i,n) sum+=S[i];
  cout<<sum-(n-1)*x<<endl;
  return 0;
}
            
            
            
        
            
umezo