結果

問題 No.716 距離
ユーザー papinianuspapinianus
提出日時 2021-06-03 01:20:36
言語 PHP
(8.3.4)
結果
AC  
実行時間 38 ms / 2,000 ms
コード長 315 bytes
コンパイル時間 118 ms
コンパイル使用メモリ 31,128 KB
実行使用メモリ 31,268 KB
最終ジャッジ日時 2024-04-27 17:06:59
合計ジャッジ時間 2,442 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
31,136 KB
testcase_01 AC 36 ms
30,992 KB
testcase_02 AC 36 ms
31,172 KB
testcase_03 AC 33 ms
30,996 KB
testcase_04 AC 34 ms
31,084 KB
testcase_05 AC 34 ms
30,988 KB
testcase_06 AC 32 ms
31,028 KB
testcase_07 AC 32 ms
31,052 KB
testcase_08 AC 31 ms
31,184 KB
testcase_09 AC 32 ms
31,052 KB
testcase_10 AC 32 ms
31,268 KB
testcase_11 AC 34 ms
30,896 KB
testcase_12 AC 34 ms
30,904 KB
testcase_13 AC 33 ms
30,892 KB
testcase_14 AC 38 ms
31,088 KB
testcase_15 AC 35 ms
31,220 KB
testcase_16 AC 34 ms
31,232 KB
testcase_17 AC 34 ms
31,060 KB
testcase_18 AC 34 ms
30,860 KB
testcase_19 AC 34 ms
31,204 KB
testcase_20 AC 35 ms
31,048 KB
testcase_21 AC 34 ms
30,988 KB
testcase_22 AC 34 ms
31,052 KB
testcase_23 AC 33 ms
31,212 KB
testcase_24 AC 33 ms
30,932 KB
testcase_25 AC 32 ms
31,008 KB
testcase_26 AC 33 ms
30,988 KB
testcase_27 AC 35 ms
31,096 KB
testcase_28 AC 34 ms
31,104 KB
testcase_29 AC 33 ms
30,872 KB
testcase_30 AC 34 ms
31,152 KB
testcase_31 AC 35 ms
31,016 KB
testcase_32 AC 35 ms
30,764 KB
testcase_33 AC 33 ms
30,928 KB
testcase_34 AC 34 ms
31,108 KB
testcase_35 AC 35 ms
30,872 KB
testcase_36 AC 35 ms
30,908 KB
testcase_37 AC 33 ms
30,992 KB
testcase_38 AC 32 ms
31,016 KB
testcase_39 AC 33 ms
30,900 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
declare(strict_types=1);
$N = trim(fgets(STDIN));
$an = array_map(fn($e)=>intval($e), explode(" ", trim(fgets(STDIN))));
$min = min(array_map(fn($e) => (int)abs($e[0] - $e[1]),array_map(null, array_slice($an, 1),array_slice($an,0,$N -1))));
$max = (int)abs($an[$N-1] - $an[0]);
echo $min.PHP_EOL.$max.PHP_EOL;
0