結果
問題 |
No.21 平均の差
|
ユーザー |
![]() |
提出日時 | 2015-07-26 21:51:43 |
言語 | C90 (gcc 12.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 226 bytes |
コンパイル時間 | 906 ms |
コンパイル使用メモリ | 19,968 KB |
実行使用メモリ | 15,032 KB |
最終ジャッジ日時 | 2024-07-16 00:17:36 |
合計ジャッジ時間 | 14,032 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | TLE * 1 -- * 9 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%d",&N); | ^~~~~~~~~~~~~~ main.c:10:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | scanf("%*d"); | ^~~~~~~~~~~~ main.c:14:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 14 | scanf("%d",&n); | ^~~~~~~~~~~~~~
ソースコード
#include<stdio.h> int main(void){ int N; scanf("%d",&N); int max=1; int min=1000; scanf("%*d"); while(N>0){ int n; scanf("%d",&n); max=n>max?n:max; min=n<min?n:min; } printf("%d\n",max-min); return 0; }