結果
問題 | No.21 平均の差 |
ユーザー | takosama |
提出日時 | 2017-12-16 20:47:20 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 23 ms / 5,000 ms |
コード長 | 826 bytes |
コンパイル時間 | 870 ms |
コンパイル使用メモリ | 104,064 KB |
実行使用メモリ | 17,920 KB |
最終ジャッジ日時 | 2024-12-14 21:54:10 |
合計ジャッジ時間 | 1,645 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
コンパイルメッセージ
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.IO; using System.Linq; using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; namespace yukicore { class Program { //no21 static void Main(string[] args) { //読み飛ばし Console.ReadLine(); Console.ReadLine(); //開始 int max = int.MinValue; int min = int.MaxValue; while (true) { var tmp = Console.ReadLine(); if(tmp==""|| tmp ==null ) break; int num = int.Parse(tmp); max = max < num ? num : max; min = min > num ? num : min; } Console.WriteLine(max-min); } } }