結果

問題 No.126 2基のエレベータ
ユーザー matu08151980matu08151980
提出日時 2015-01-25 15:33:59
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 226 bytes
コンパイル時間 157 ms
コンパイル使用メモリ 18,712 KB
実行使用メモリ 18,996 KB
最終ジャッジ日時 2023-09-05 06:11:11
合計ジャッジ時間 1,876 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
18,908 KB
testcase_01 AC 15 ms
18,852 KB
testcase_02 WA -
testcase_03 AC 16 ms
18,856 KB
testcase_04 AC 16 ms
18,872 KB
testcase_05 AC 16 ms
18,872 KB
testcase_06 WA -
testcase_07 AC 16 ms
18,916 KB
testcase_08 AC 15 ms
18,736 KB
testcase_09 AC 15 ms
18,876 KB
testcase_10 AC 15 ms
18,868 KB
testcase_11 AC 15 ms
18,940 KB
testcase_12 AC 15 ms
18,968 KB
testcase_13 AC 15 ms
18,940 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 15 ms
18,984 KB
testcase_17 WA -
testcase_18 AC 15 ms
18,916 KB
testcase_19 AC 15 ms
18,980 KB
testcase_20 WA -
testcase_21 AC 15 ms
18,936 KB
testcase_22 AC 15 ms
18,916 KB
testcase_23 AC 15 ms
18,960 KB
testcase_24 AC 16 ms
18,916 KB
testcase_25 AC 16 ms
18,880 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 15 ms
18,948 KB
testcase_29 AC 15 ms
18,860 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php

fscanf(STDIN, "%d %d %d", $a, $b, $s);


$zetaia=abs($a-$s);
$zetaib=abs($b-$s);

//aが地下の場合
if($a==0){ 
	$i++;
}

if($zetaia<=$zetaib){
	$i+=$zetaia+$s;
}else{
	$i+=$zetaib+$zetaia+$a;	
}


echo $i."\n";

?>
0