結果
| 問題 |
No.394 ハーフパイプ(1)
|
| コンテスト | |
| ユーザー |
fujita
|
| 提出日時 | 2023-05-12 16:56:56 |
| 言語 | C# (.NET 8.0.404) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 966 bytes |
| コンパイル時間 | 9,494 ms |
| コンパイル使用メモリ | 168,376 KB |
| 実行使用メモリ | 185,528 KB |
| 最終ジャッジ日時 | 2024-11-28 14:07:29 |
| 合計ジャッジ時間 | 10,784 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 WA * 3 MLE * 1 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (93 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
using System.Collections.Generic;
using System;
using System.Drawing;
namespace yukicoder
{
class Program
{
static void Main(string[] args)
{
var S = Console.ReadLine().Split(" ");
List<int> list = new List<int>();
double sum = 0;
for(int i = 0; i < S.Length; i++)
{
list.Add(int.Parse(S[i]));
}
list.Sort();
list.Remove(list[0]);
list.Remove(list[list.Count - 1]);
for(int j = 0; j < list.Count; j++)
{
double n = list[j] ;
sum += list[j];
}
double ans = sum / list.Count;
if (sum % list.Count == 0)
{
Console.WriteLine((double)ans + ".00");
}
else
{
Console.WriteLine((double)ans);
}
}
}
}
fujita