結果

問題 No.406 鴨等間隔の法則
ユーザー nukosukenukosuke
提出日時 2016-10-20 13:52:07
言語 Raku
(rakudo v2024.02)
結果
WA  
実行時間 -
コード長 237 bytes
コンパイル時間 692 ms
コンパイル使用メモリ 135,768 KB
実行使用メモリ 174,300 KB
最終ジャッジ日時 2024-05-03 13:22:46
合計ジャッジ時間 24,912 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 661 ms
146,060 KB
testcase_01 AC 482 ms
136,712 KB
testcase_02 WA -
testcase_03 AC 485 ms
136,712 KB
testcase_04 AC 866 ms
159,356 KB
testcase_05 AC 626 ms
145,672 KB
testcase_06 AC 628 ms
144,860 KB
testcase_07 AC 622 ms
145,588 KB
testcase_08 AC 842 ms
159,444 KB
testcase_09 AC 889 ms
162,676 KB
testcase_10 AC 649 ms
146,336 KB
testcase_11 AC 805 ms
155,676 KB
testcase_12 AC 688 ms
147,868 KB
testcase_13 AC 694 ms
148,220 KB
testcase_14 AC 846 ms
159,000 KB
testcase_15 AC 506 ms
139,940 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 530 ms
141,448 KB
testcase_20 AC 543 ms
141,732 KB
testcase_21 WA -
testcase_22 AC 586 ms
145,640 KB
testcase_23 AC 684 ms
149,212 KB
testcase_24 AC 805 ms
156,448 KB
testcase_25 AC 899 ms
163,564 KB
testcase_26 AC 999 ms
174,300 KB
testcase_27 AC 774 ms
163,120 KB
testcase_28 AC 776 ms
163,320 KB
testcase_29 AC 1,005 ms
174,028 KB
testcase_30 AC 1,004 ms
174,012 KB
testcase_31 AC 882 ms
159,988 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

get();
my @x = get().split(' ').map({.Int}).sort({ $^a <=> $^b });
my $diff = @x[1] - @x[0];
my $ans  = True;

for 2..@x.end {
  if $diff == 0 {
    $ans = False;
    last;
  }
  $diff = @x[$_] - @x[$_-1];
}

say($ans ?? 'YES' !! 'NO');
0