結果
| 問題 | 
                            No.191 供託金
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2015-05-20 23:15:38 | 
| 言語 | C90  (gcc 12.3.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 1 ms / 5,000 ms | 
| コード長 | 356 bytes | 
| コンパイル時間 | 1,077 ms | 
| コンパイル使用メモリ | 20,224 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-11-16 20:35:49 | 
| 合計ジャッジ時間 | 1,864 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 23 | 
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:9: warning: ignoring return value of ‘fscanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |         fscanf(stdin, "%d", &n);
      |         ^~~~~~~~~~~~~~~~~~~~~~~
main.c:8:17: warning: ignoring return value of ‘fscanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 |                 fscanf(stdin, "%d", &c[i]);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
            
            ソースコード
#include <stdio.h>
int main(void) {
	// your code goes here
	int n, c[100], i, total = 0, count = 0;
	fscanf(stdin, "%d", &n);
	for(i = 0; i < n; i++)
		fscanf(stdin, "%d", &c[i]);
	
	for(i = 0; i < n; i++)
		total += c[i];
		
	total = total / 10;
	
	for(i = 0; i < n; i++){
		if(c[i] <= total)
			count++;
	}
	
	printf("%d\n", count * 30);
	
	return 0;
}