結果

問題 No.185 和風
ユーザー mondomondo
提出日時 2019-07-30 10:24:58
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 341 bytes
コンパイル時間 56 ms
コンパイル使用メモリ 12,072 KB
実行使用メモリ 12,316 KB
最終ジャッジ日時 2023-09-15 12:13:33
合計ジャッジ時間 743 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 8 ms
12,256 KB
testcase_02 AC 8 ms
12,288 KB
testcase_03 AC 8 ms
12,284 KB
testcase_04 AC 8 ms
12,256 KB
testcase_05 AC 7 ms
12,216 KB
testcase_06 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$count= trim(fgets(STDIN));
$number = array();
$answer = 0;
for ($i = 0; $i < $count; $i++) {
     $number = explode(" ", trim(fgets(STDIN)));
     list($number1, $number2) = $number;
     $answer = $number2 - $number1;
     $array[] = $answer;
}
if (count(array_unique($array)) == 0) {
    echo $array[0];
} else {
    echo "-1";
}


0