結果

問題 No.191 供託金
コンテスト
ユーザー Naoki00712
提出日時 2023-06-01 15:43:02
言語 C(gnu17)
(gcc 15.2.0)
コンパイル:
gcc-15 -O2 -std=gnu17 -Wno-error=implicit-function-declaration -Wno-error=implicit-int -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
WA  
実行時間 -
コード長 391 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 166 ms
コンパイル使用メモリ 38,880 KB
最終ジャッジ日時 2026-02-22 10:36:15
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 21 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <stdio.h>
#include <stdlib.h>


int main()
{
	int N, sumticket = 0, payout = 0;
	scanf("%d", &N);

	int* C;
	C = (int*)malloc(sizeof(int) * N);

	for (int i = 0; i < N; i++)
	{
		int input;
		scanf("%d", &input);

		C[i] = input;
		sumticket += input;
	}

	for (int i = 0; i < N; i++)
	{
		if (C[i] < sumticket / 10)
		{
			payout += 30;
		}
	}

	printf("%d", payout);

	return 0;
}
0