結果

問題 No.126 2基のエレベータ
ユーザー matu08151980matu08151980
提出日時 2015-01-25 15:32:54
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 224 bytes
コンパイル時間 906 ms
コンパイル使用メモリ 18,692 KB
実行使用メモリ 19,124 KB
最終ジャッジ日時 2023-09-05 06:10:57
合計ジャッジ時間 2,562 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
18,912 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 16 ms
18,940 KB
testcase_04 AC 16 ms
18,908 KB
testcase_05 WA -
testcase_06 AC 16 ms
18,876 KB
testcase_07 WA -
testcase_08 AC 16 ms
18,956 KB
testcase_09 AC 16 ms
18,808 KB
testcase_10 AC 16 ms
18,928 KB
testcase_11 AC 16 ms
18,812 KB
testcase_12 AC 16 ms
18,956 KB
testcase_13 AC 16 ms
18,952 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 16 ms
18,940 KB
testcase_17 WA -
testcase_18 AC 16 ms
18,916 KB
testcase_19 AC 15 ms
18,924 KB
testcase_20 WA -
testcase_21 AC 16 ms
18,864 KB
testcase_22 AC 16 ms
18,868 KB
testcase_23 AC 16 ms
19,100 KB
testcase_24 AC 16 ms
18,872 KB
testcase_25 AC 16 ms
18,940 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 16 ms
18,840 KB
testcase_29 AC 16 ms
18,804 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