結果
| 問題 |
No.1389 Clumsy Calculation
|
| コンテスト | |
| ユーザー |
pengin_2000
|
| 提出日時 | 2021-07-11 15:31:10 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 31 ms / 2,000 ms |
| コード長 | 288 bytes |
| コンパイル時間 | 110 ms |
| コンパイル使用メモリ | 28,928 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-02 03:05:28 |
| 合計ジャッジ時間 | 2,416 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 |
ソースコード
#include<stdio.h>
int main()
{
long long int n, x;
scanf("%lld %lld", &n, &x);
long long int i;
long long int s[200005];
for (i = 0; i < n; i++)
scanf("%lld", &s[i]);
long long int sum = 0;
for (i = 0; i < n; i++)
sum += s[i];
printf("%lld\n", sum - x * (n - 1));
return 0;
}
pengin_2000