結果
| 問題 |
No.394 ハーフパイプ(1)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-10-27 07:29:29 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 35 ms / 2,000 ms |
| コード長 | 1,332 bytes |
| コンパイル時間 | 828 ms |
| コンパイル使用メモリ | 112,532 KB |
| 実行使用メモリ | 20,096 KB |
| 最終ジャッジ日時 | 2024-11-21 20:39:54 |
| 合計ジャッジ時間 | 1,781 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Collections.Generic;
using System.Linq;
namespace yukicodeX {
public class Program {
public static string Solver(System.IO.TextReader reader) {
var s = MyLib.GetIntList( reader.ReadLine() ).OrderBy( x => x ).TakeLast( 5 ).Take( 4 ).Sum();
return string.Format( "{0:f2}", s / 4.0 );
}
private static void Main() {
Console.WriteLine( Solver( Console.In ) );
}
}
public class MyLib {
public static string Ordinalization(int num) {
string surfix = "stndrdth";
return string.Format( "{0}{1}", num,
( 0 < num % 10 && num % 10 <= 4 ) && ( ( num % 100 ) / 10 != 1 ) ?
surfix.Substring( ( num % 10 - 1 ) * 2, 2 ) : surfix.Substring( 6 ) );
}
public static List<int> GetIntList(string input) {
return input.Split().ToList<string>().ConvertAll<int>( int.Parse );
}
public static List<int> GetIntList(string input, char delimitor) {
return input.Split( delimitor ).ToList<string>().ConvertAll<int>( int.Parse );
}
public static List<int> GetIntList(string input, char[] delimitors) {
return input.Split( delimitors ).ToList<string>().ConvertAll<int>( int.Parse );
}
}
}