結果

問題 No.970 数列変換マシン
ユーザー pengin_2000pengin_2000
提出日時 2020-02-27 17:12:23
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 342 bytes
コンパイル時間 979 ms
コンパイル使用メモリ 29,440 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-21 17:01:19
合計ジャッジ時間 2,276 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 18 ms
6,940 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 1 ms
6,944 KB
testcase_10 AC 1 ms
6,940 KB
testcase_11 AC 1 ms
6,940 KB
testcase_12 AC 1 ms
6,940 KB
testcase_13 AC 1 ms
6,940 KB
testcase_14 WA -
testcase_15 AC 1 ms
6,940 KB
testcase_16 AC 1 ms
6,940 KB
testcase_17 AC 1 ms
6,940 KB
testcase_18 AC 1 ms
6,940 KB
testcase_19 AC 1 ms
6,940 KB
testcase_20 AC 1 ms
6,940 KB
testcase_21 AC 1 ms
6,940 KB
testcase_22 AC 1 ms
6,940 KB
testcase_23 AC 1 ms
6,944 KB
testcase_24 AC 1 ms
6,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<stdio.h>
int main()
{
	int n;
	scanf("%d", &n);
	int i;
	int y[100005];
	for (i = 0; i < n; i++)
		scanf("%d", &y[i]);
	for (i = 0; i < n; i++)
		y[i] *= n - 1;
	int sum = 0;
	for (i = 0; i < n; i++)
		sum += y[i];
	sum /= n - 1;
	for (i = 0; i < n - 1; i++)
		printf("%d ", sum - y[i]);
	printf("%d\n", sum - y[n - 1]);
	return 0;
}
0