結果

問題 No.716 距離
ユーザー Kaz_nlKaz_nl
提出日時 2018-12-30 10:31:31
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 34 ms / 2,000 ms
コード長 386 bytes
コンパイル時間 781 ms
コンパイル使用メモリ 110,120 KB
実行使用メモリ 27,768 KB
最終ジャッジ日時 2024-04-15 17:32:50
合計ジャッジ時間 3,096 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
25,632 KB
testcase_01 AC 33 ms
25,468 KB
testcase_02 AC 33 ms
25,892 KB
testcase_03 AC 33 ms
27,392 KB
testcase_04 AC 33 ms
25,464 KB
testcase_05 AC 33 ms
27,648 KB
testcase_06 AC 33 ms
26,028 KB
testcase_07 AC 29 ms
25,372 KB
testcase_08 AC 28 ms
25,012 KB
testcase_09 AC 28 ms
27,164 KB
testcase_10 AC 33 ms
25,632 KB
testcase_11 AC 32 ms
23,732 KB
testcase_12 AC 32 ms
25,460 KB
testcase_13 AC 33 ms
27,384 KB
testcase_14 AC 28 ms
25,380 KB
testcase_15 AC 33 ms
27,636 KB
testcase_16 AC 32 ms
25,648 KB
testcase_17 AC 33 ms
27,768 KB
testcase_18 AC 27 ms
25,248 KB
testcase_19 AC 31 ms
25,520 KB
testcase_20 AC 28 ms
27,148 KB
testcase_21 AC 32 ms
25,552 KB
testcase_22 AC 33 ms
25,672 KB
testcase_23 AC 27 ms
23,220 KB
testcase_24 AC 33 ms
27,508 KB
testcase_25 AC 32 ms
25,628 KB
testcase_26 AC 32 ms
25,776 KB
testcase_27 AC 33 ms
27,508 KB
testcase_28 AC 27 ms
25,264 KB
testcase_29 AC 32 ms
25,636 KB
testcase_30 AC 32 ms
25,760 KB
testcase_31 AC 32 ms
27,636 KB
testcase_32 AC 33 ms
25,884 KB
testcase_33 AC 32 ms
25,644 KB
testcase_34 AC 32 ms
27,480 KB
testcase_35 AC 28 ms
25,096 KB
testcase_36 AC 32 ms
25,648 KB
testcase_37 AC 28 ms
25,376 KB
testcase_38 AC 32 ms
25,500 KB
testcase_39 AC 32 ms
25,504 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.Linq;

class Program {
  static void Main() {
    int n = int.Parse(Console.ReadLine());
    var a = Console.ReadLine().Split().Select(int.Parse).ToArray();
    int max = a[n - 1] - a[0];
    int min = 200001;
    for (int i = 0; i < n - 1; i++) {
      min = Math.Min(a[i + 1] - a[i], min);
    }
    Console.WriteLine(min);
    Console.WriteLine(max);
  }
}
0