結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 8 ms
12,308 KB
testcase_01 WA -
testcase_02 AC 8 ms
12,220 KB
testcase_03 AC 8 ms
12,304 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 8 ms
12,296 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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;
}
// print_r($array);
if ($array[0] === $array[1]) {
    echo $array[0];
} else {
    echo "-1";
}
0