結果

問題 No.191 供託金
コンテスト
ユーザー でばら焼肉のたれ
提出日時 2026-09-17 14:31:53
言語 C
(gcc 15.3.0)
コンパイル:
gcc-15 -O2 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
AC  
実行時間 0 ms / 5,000 ms
+ 698µs
コード長 329 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 89 ms
コンパイル使用メモリ 37,120 KB
実行使用メモリ 6,528 KB
最終ジャッジ日時 2026-09-17 14:31:55
合計ジャッジ時間 1,596 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <stdio.h>

#define DEPOSIT	30

int main(void)
{
	int n;
	int c[100] = {0};
	int total = 0;
	int count = 0;
	int i;

	scanf("%d", &n);

	for (i = 0; i < n; i++) {
		scanf("%d", &c[i]);
		total += c[i];
	}
	
	for (i = 0; i < n; i++) 
		if (c[i] * 10 <= total)
			count++;
	
	printf("%d\n", count * DEPOSIT);

	return 0;
}
0