結果
| 問題 | 
                            No.1131 Deviation Score
                             | 
                    
| ユーザー | 
                             Maeda
                         | 
                    
| 提出日時 | 2025-03-17 17:06:36 | 
| 言語 | C  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 336 bytes | 
| コンパイル時間 | 579 ms | 
| コンパイル使用メモリ | 25,088 KB | 
| 実行使用メモリ | 7,328 KB | 
| 最終ジャッジ日時 | 2025-03-17 17:06:39 | 
| 合計ジャッジ時間 | 3,076 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | WA * 1 | 
| other | WA * 21 | 
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    5 |         scanf("%d",&student);
      |         ^~~~~~~~~~~~~~~~~~~~
main.c:9:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    9 |                 scanf("%d",&points[i]);
      |                 ^~~~~~~~~~~~~~~~~~~~~~
            
            ソースコード
#include <stdio.h>
void main(void) {
	int student = 0;
	scanf("%d",&student);
	int points[student];
	int ave = 0;
	for(int i = 0; i < student;i++){
		scanf("%d",&points[i]);
		ave += points[i];
	}
	
	for(int i = 0; i < student;i++){
		int result = points[i] - ave;
		if(result < 0){
			result *= -1;
		}
		printf("%d\n",result/2);
	}
}
            
            
            
        
            
Maeda