結果

問題 No.383 レーティング
ユーザー takeya_okinotakeya_okino
提出日時 2017-07-15 16:29:00
言語 PHP
(8.3.4)
結果
AC  
実行時間 41 ms / 2,000 ms
コード長 205 bytes
コンパイル時間 98 ms
コンパイル使用メモリ 31,072 KB
実行使用メモリ 31,548 KB
最終ジャッジ日時 2024-04-16 21:48:27
合計ジャッジ時間 1,196 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
31,048 KB
testcase_01 AC 41 ms
31,416 KB
testcase_02 AC 41 ms
31,236 KB
testcase_03 AC 38 ms
31,168 KB
testcase_04 AC 37 ms
31,340 KB
testcase_05 AC 40 ms
31,172 KB
testcase_06 AC 37 ms
31,548 KB
testcase_07 AC 38 ms
31,336 KB
testcase_08 AC 38 ms
31,236 KB
testcase_09 AC 36 ms
31,344 KB
testcase_10 AC 38 ms
31,192 KB
testcase_11 AC 36 ms
31,232 KB
testcase_12 AC 39 ms
31,408 KB
testcase_13 AC 36 ms
30,920 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$array = explode(" ", trim(fgets(STDIN)));
$a = $array[0];
$b = $array[1];
$ans = '0';
if($b - $a > 0) {
  $ans = '+' . ($b - $a);
} else if($b - $a < 0) {
  $ans = '-' . ($a - $b);
}
print($ans);
?>
0