結果

問題 No.21 平均の差
ユーザー uma-pinehilluma-pinehill
提出日時 2018-05-24 10:54:03
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 62 ms / 5,000 ms
コード長 1,012 bytes
コンパイル時間 3,037 ms
コンパイル使用メモリ 108,320 KB
実行使用メモリ 23,712 KB
最終ジャッジ日時 2023-09-11 02:13:26
合計ジャッジ時間 4,459 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
19,624 KB
testcase_01 AC 60 ms
21,544 KB
testcase_02 AC 61 ms
23,572 KB
testcase_03 AC 60 ms
21,612 KB
testcase_04 AC 62 ms
23,712 KB
testcase_05 AC 59 ms
21,512 KB
testcase_06 AC 60 ms
23,528 KB
testcase_07 AC 60 ms
21,424 KB
testcase_08 AC 61 ms
23,652 KB
testcase_09 AC 62 ms
23,640 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;

public class Program
{
    static void Main()
    {
        int Width = int.Parse(Console.ReadLine());
        int Group = int.Parse(Console.ReadLine());
        
        var ValueList = GetInt(Width).ToList().OrderByDescending(a => a);
        int Result = ValueList.First() - ValueList.Last();
        Console.WriteLine(Result);
    }
    
    static IEnumerable<char> GetChar(){
        int Moji = 0;
        int Count = 1;
        char tmp = (char)0;
        while((Moji = Console.Read()) != -1){
            if(Moji <65 || Moji >90){
                break;
            }
            tmp = (char)(( Moji - 65 + 26 - Count)%26 + 65);
            yield return tmp;
            Count = (Count + 1)%26;
        }
    }
    
    static IEnumerable<int> GetInt(int Loop){
        for(var i = 0; i < Loop ; i++){
            yield return int.Parse(Console.ReadLine());
        }
    }
    
    static void WriteLine <T>(T dsads){
        
    }
}
0