結果
問題 | No.394 ハーフパイプ(1) |
ユーザー | fujita |
提出日時 | 2023-05-12 16:56:56 |
言語 | C# (.NET 8.0.203) |
結果 |
WA
|
実行時間 | - |
コード長 | 966 bytes |
コンパイル時間 | 10,818 ms |
コンパイル使用メモリ | 146,380 KB |
実行使用メモリ | 162,600 KB |
最終ジャッジ日時 | 2023-08-19 01:37:55 |
合計ジャッジ時間 | 9,612 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 53 ms
28,880 KB |
testcase_01 | AC | 52 ms
28,512 KB |
testcase_02 | AC | 53 ms
28,648 KB |
testcase_03 | AC | 52 ms
28,952 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | AC | 52 ms
28,816 KB |
testcase_07 | WA | - |
testcase_08 | AC | 52 ms
30,832 KB |
testcase_09 | AC | 50 ms
30,612 KB |
testcase_10 | MLE | - |
コンパイルメッセージ
Determining projects to restore... Restored /home/judge/data/code/main.csproj (in 152 ms). .NET 向け Microsoft (R) Build Engine バージョン 17.0.0-preview-21470-01+cb055d28f Copyright (C) Microsoft Corporation.All rights reserved. プレビュー版の .NET を使用しています。https://aka.ms/dotnet-core-preview をご覧ください main -> /home/judge/data/code/bin/Release/net6.0/main.dll main -> /home/judge/data/code/bin/Release/net6.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); } } } }