結果

問題 No.406 鴨等間隔の法則
ユーザー pirorirori_n712pirorirori_n712
提出日時 2018-06-21 01:51:28
言語 C#(csc)
(csc 3.9.0)
結果
RE  
実行時間 -
コード長 429 bytes
コンパイル時間 2,055 ms
コンパイル使用メモリ 103,920 KB
実行使用メモリ 32,708 KB
最終ジャッジ日時 2023-09-13 07:30:20
合計ジャッジ時間 7,107 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 98 ms
26,260 KB
testcase_01 RE -
testcase_02 AC 61 ms
23,680 KB
testcase_03 RE -
testcase_04 AC 137 ms
29,580 KB
testcase_05 AC 92 ms
23,580 KB
testcase_06 AC 94 ms
23,868 KB
testcase_07 AC 95 ms
23,996 KB
testcase_08 AC 140 ms
29,612 KB
testcase_09 AC 144 ms
30,072 KB
testcase_10 AC 102 ms
24,044 KB
testcase_11 AC 127 ms
28,888 KB
testcase_12 AC 106 ms
26,756 KB
testcase_13 AC 103 ms
24,688 KB
testcase_14 RE -
testcase_15 RE -
testcase_16 AC 75 ms
22,280 KB
testcase_17 AC 70 ms
22,004 KB
testcase_18 AC 73 ms
22,352 KB
testcase_19 RE -
testcase_20 RE -
testcase_21 AC 76 ms
22,656 KB
testcase_22 RE -
testcase_23 AC 109 ms
28,884 KB
testcase_24 RE -
testcase_25 AC 146 ms
30,272 KB
testcase_26 RE -
testcase_27 RE -
testcase_28 AC 144 ms
28,116 KB
testcase_29 RE -
testcase_30 RE -
testcase_31 AC 141 ms
31,984 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 No406{
    static void Main(){
        var n=Int32.Parse(Console.ReadLine());
        var k=Console.ReadLine().Split(' ').Select(j=>Int32.Parse(j)).OrderBy(l=>l).ToArray();
        var d=k[1]-k[0];
        var a="YES";
        for(int i=1;i<n;++i){
            if(k[i+1]-k[i]!=d){
                a="NO";
                break;
            }
        }
        Console.WriteLine(a);
    }
}
0