結果
問題 |
No.394 ハーフパイプ(1)
|
ユーザー |
![]() |
提出日時 | 2019-08-20 11:28:58 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 481 bytes |
コンパイル時間 | 405 ms |
コンパイル使用メモリ | 30,336 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-06 11:49:48 |
合計ジャッジ時間 | 818 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
ソースコード
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> int swap(const void* a, const void* b); int main(void) { int judge[6]={0}; float totalscore=0; for(int i=0;i<6;i++) { scanf("%d",&judge[i]); } qsort(judge, 6, sizeof(int), swap); for(int i=1;i<5;i++) { totalscore+=judge[i]; } totalscore/=4; printf("%.2f",totalscore); } int swap(const void* a, const void* b) { return *(int*)a - *(int*)b; }