結果
| 問題 | No.394 ハーフパイプ(1) |
| コンテスト | |
| ユーザー |
Maeda
|
| 提出日時 | 2025-03-10 14:57:47 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 406 bytes |
| コンパイル時間 | 448 ms |
| コンパイル使用メモリ | 25,728 KB |
| 実行使用メモリ | 7,324 KB |
| 最終ジャッジ日時 | 2025-03-10 14:57:49 |
| 合計ジャッジ時間 | 1,295 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 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.2f",ave/4);
}
Maeda