結果
| 問題 | 
                            No.394 ハーフパイプ(1)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             Maeda
                         | 
                    
| 提出日時 | 2025-03-10 14:55:02 | 
| 言語 | C  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 406 bytes | 
| コンパイル時間 | 499 ms | 
| コンパイル使用メモリ | 25,728 KB | 
| 実行使用メモリ | 7,324 KB | 
| 最終ジャッジ日時 | 2025-03-10 14:55:03 | 
| 合計ジャッジ時間 | 1,441 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | WA * 11 | 
コンパイルメッセージ
main.c: In function ‘main’:
main.c:7:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 |                 scanf("%d",&scoreList[i]);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~
            
            ソースコード
#include <stdio.h>
void main(void){
	int scoreList[6];
	
	for(int i = 0 ; i < 6;i++){
		scanf("%d",&scoreList[i]);
	}
	for(int i = 0;i< 6;i++){
		for(int j = i ;j < 6;j++){
			if(scoreList[i] > scoreList[j]){
				int num = scoreList[i];
				scoreList[i] = scoreList[j];
				scoreList[j] = num;
			}
		}
	}
	
	double ave = 0;
	for(int i = 1;i < 5;i++){
		ave += scoreList[i];
	}
	printf("%0.0f",ave/4);
	
}
            
            
            
        
            
Maeda