結果

問題 No.191 供託金
ユーザー TLwiegehttTLwiegehtt
提出日時 2015-07-08 02:17:58
言語 C90
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 278 bytes
コンパイル時間 118 ms
コンパイル使用メモリ 20,480 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-16 20:50:37
合計ジャッジ時間 897 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:9:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    9 |         scanf("%d", &n);
      |         ^~~~~~~~~~~~~~~
main.c:11:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   11 |                 scanf("%d", &c[i]);
      |                 ^~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main(void){
	int i,n;
	int cnt = 0;
	int sum = 0;
	int c[110];
	
	scanf("%d", &n);
	for(i=0;i<n;i++){
		scanf("%d", &c[i]);
		sum += c[i];
	}
	
	sum /= 10;
	
	for(i=0;i<n;i++){
		if(c[i] <= sum){
			cnt++;
		}
	}
	
	printf("%d\n", (cnt*30));
	return 0;
}
0