結果

問題 No.627 ランダムウォークの軌跡
ユーザー kifara155
提出日時 2018-01-14 03:14:11
言語 PHP
(843.2)
結果
WA  
実行時間 -
コード長 371 bytes
コンパイル時間 3,144 ms
コンパイル使用メモリ 30,292 KB
実行使用メモリ 31,160 KB
最終ジャッジ日時 2024-12-24 02:44:42
合計ジャッジ時間 4,330 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10 WA * 23
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$judge = true;
$array = [];
$line = fgets(STDIN);
for($count = 0; $count < $line; $count ++){
  array_push($array, fgets(STDIN));
  $nextNum1 = $array[$count] + 1;
  $nextNum2 = $array[$count] - 1;
  $next = next($array);
  if($next != $nextNum1 || $next != $nextNum2) {
    $judge = false;
  }
}

if ($judge === true) {
  printf('T');
} else {
  printf('F');
}
?>
0