結果

問題 No.406 鴨等間隔の法則
ユーザー bluemeganebluemegane
提出日時 2018-09-17 20:02:40
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 462 bytes
コンパイル時間 2,022 ms
コンパイル使用メモリ 104,432 KB
実行使用メモリ 30,156 KB
最終ジャッジ日時 2023-09-25 09:34:02
合計ジャッジ時間 6,527 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
22,840 KB
testcase_01 AC 58 ms
22,796 KB
testcase_02 AC 57 ms
20,760 KB
testcase_03 WA -
testcase_04 AC 118 ms
29,624 KB
testcase_05 AC 86 ms
22,616 KB
testcase_06 AC 84 ms
22,744 KB
testcase_07 AC 88 ms
22,768 KB
testcase_08 AC 117 ms
27,636 KB
testcase_09 AC 123 ms
30,064 KB
testcase_10 AC 87 ms
20,868 KB
testcase_11 AC 110 ms
27,044 KB
testcase_12 AC 95 ms
23,148 KB
testcase_13 AC 91 ms
25,616 KB
testcase_14 AC 113 ms
27,252 KB
testcase_15 WA -
testcase_16 AC 69 ms
21,208 KB
testcase_17 AC 67 ms
20,984 KB
testcase_18 AC 69 ms
21,236 KB
testcase_19 AC 70 ms
21,432 KB
testcase_20 AC 71 ms
19,660 KB
testcase_21 AC 73 ms
23,608 KB
testcase_22 AC 79 ms
22,132 KB
testcase_23 AC 97 ms
27,892 KB
testcase_24 AC 109 ms
26,808 KB
testcase_25 AC 124 ms
28,168 KB
testcase_26 AC 123 ms
30,156 KB
testcase_27 WA -
testcase_28 AC 118 ms
28,056 KB
testcase_29 AC 123 ms
30,128 KB
testcase_30 AC 124 ms
28,224 KB
testcase_31 AC 121 ms
27,852 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);
        Array.Sort(a);
        var t = a[1] - a[0];
        for (int i = 1; i < n-1; i++)
            if (a[i + 1] - a[i] != t) { Console.WriteLine("NO"); goto end; }
        Console.WriteLine("YES");
        end:;
    }
}
0