結果

問題 No.406 鴨等間隔の法則
ユーザー ayaaya
提出日時 2019-08-01 10:14:31
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 337 bytes
コンパイル時間 1,572 ms
コンパイル使用メモリ 18,532 KB
実行使用メモリ 27,032 KB
最終ジャッジ日時 2023-09-18 17:18:01
合計ジャッジ時間 5,858 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
22,736 KB
testcase_01 AC 16 ms
18,844 KB
testcase_02 AC 16 ms
18,844 KB
testcase_03 WA -
testcase_04 AC 139 ms
26,832 KB
testcase_05 AC 55 ms
22,880 KB
testcase_06 AC 60 ms
22,836 KB
testcase_07 AC 58 ms
22,864 KB
testcase_08 AC 136 ms
26,964 KB
testcase_09 AC 150 ms
27,012 KB
testcase_10 AC 65 ms
22,708 KB
testcase_11 AC 116 ms
26,992 KB
testcase_12 AC 76 ms
22,932 KB
testcase_13 AC 73 ms
22,928 KB
testcase_14 AC 139 ms
26,960 KB
testcase_15 WA -
testcase_16 AC 22 ms
18,840 KB
testcase_17 AC 19 ms
18,908 KB
testcase_18 AC 24 ms
18,888 KB
testcase_19 AC 26 ms
18,920 KB
testcase_20 AC 31 ms
18,864 KB
testcase_21 AC 29 ms
18,820 KB
testcase_22 AC 43 ms
20,856 KB
testcase_23 AC 81 ms
22,936 KB
testcase_24 AC 120 ms
26,984 KB
testcase_25 AC 147 ms
26,972 KB
testcase_26 AC 168 ms
26,824 KB
testcase_27 WA -
testcase_28 AC 144 ms
26,948 KB
testcase_29 AC 168 ms
26,992 KB
testcase_30 AC 165 ms
27,032 KB
testcase_31 AC 141 ms
26,832 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$fuyou=trim(fgets(STDIN));
$duckPoint=explode(" ",trim(fgets(STDIN)));
sort($duckPoint);
$ans=(int)$duckPoint[1]-(int)$duckPoint[0];
for($i=1;$i<=count($duckPoint)-2;$i++){
  $duckLength=(int)$duckPoint[$i+1]-(int)$duckPoint[$i];
  if($ans!=$duckLength){
    $ans="NO";
    break;
  }
}
if(is_int($ans)){
  $ans="YES";
}
echo $ans;
0