結果

問題 No.716 距離
ユーザー bluemeganebluemegane
提出日時 2018-09-05 17:08:18
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 30 ms / 2,000 ms
コード長 446 bytes
コンパイル時間 1,840 ms
コンパイル使用メモリ 105,876 KB
実行使用メモリ 26,800 KB
最終ジャッジ日時 2024-04-27 14:35:17
合計ジャッジ時間 4,055 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
22,456 KB
testcase_01 AC 27 ms
24,408 KB
testcase_02 AC 27 ms
24,548 KB
testcase_03 AC 26 ms
26,576 KB
testcase_04 AC 27 ms
26,584 KB
testcase_05 AC 27 ms
24,540 KB
testcase_06 AC 26 ms
24,424 KB
testcase_07 AC 23 ms
26,012 KB
testcase_08 AC 22 ms
24,108 KB
testcase_09 AC 23 ms
24,044 KB
testcase_10 AC 27 ms
26,508 KB
testcase_11 AC 26 ms
24,552 KB
testcase_12 AC 26 ms
26,708 KB
testcase_13 AC 25 ms
24,428 KB
testcase_14 AC 21 ms
23,968 KB
testcase_15 AC 26 ms
24,132 KB
testcase_16 AC 27 ms
24,684 KB
testcase_17 AC 29 ms
24,684 KB
testcase_18 AC 22 ms
23,920 KB
testcase_19 AC 27 ms
24,616 KB
testcase_20 AC 22 ms
23,788 KB
testcase_21 AC 26 ms
24,364 KB
testcase_22 AC 26 ms
26,416 KB
testcase_23 AC 24 ms
21,820 KB
testcase_24 AC 28 ms
26,440 KB
testcase_25 AC 26 ms
26,800 KB
testcase_26 AC 27 ms
26,596 KB
testcase_27 AC 27 ms
26,576 KB
testcase_28 AC 23 ms
24,368 KB
testcase_29 AC 26 ms
22,456 KB
testcase_30 AC 27 ms
26,596 KB
testcase_31 AC 29 ms
26,564 KB
testcase_32 AC 27 ms
26,440 KB
testcase_33 AC 30 ms
24,876 KB
testcase_34 AC 26 ms
22,708 KB
testcase_35 AC 22 ms
26,004 KB
testcase_36 AC 27 ms
26,668 KB
testcase_37 AC 22 ms
24,220 KB
testcase_38 AC 25 ms
24,496 KB
testcase_39 AC 26 ms
24,304 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

public class hello
{
    public static void Main()
    {
        var n = int.Parse(Console.ReadLine().Trim());
        string[] line = Console.ReadLine().Trim().Split(' ');
        var a = Array.ConvertAll(line, int.Parse);
        var dmin = int.MaxValue;
        for (int i = 0; i < n-1; i++)
            dmin = Math.Min(dmin, a[i + 1] - a[i]);
        Console.WriteLine(dmin);
        Console.WriteLine(a[n - 1] - a[0]);
    }
}
0