結果

問題 No.149 碁石の移動
ユーザー papinianuspapinianus
提出日時 2016-06-20 12:18:53
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 281 bytes
コンパイル時間 72 ms
コンパイル使用メモリ 31,080 KB
実行使用メモリ 31,316 KB
最終ジャッジ日時 2024-04-19 13:04:26
合計ジャッジ時間 1,582 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
30,836 KB
testcase_01 AC 44 ms
30,956 KB
testcase_02 AC 44 ms
30,860 KB
testcase_03 AC 40 ms
30,884 KB
testcase_04 AC 40 ms
30,972 KB
testcase_05 AC 40 ms
30,692 KB
testcase_06 AC 40 ms
30,972 KB
testcase_07 AC 40 ms
30,840 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 41 ms
31,040 KB
testcase_11 AC 40 ms
31,036 KB
testcase_12 AC 40 ms
30,964 KB
testcase_13 AC 40 ms
30,984 KB
testcase_14 AC 39 ms
30,904 KB
testcase_15 AC 40 ms
31,168 KB
testcase_16 AC 39 ms
30,860 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
list($aw, $ab) =  explode(' ', trim(fgets(STDIN)));
list($bw, $bb) =  explode(' ', trim(fgets(STDIN)));
list($remove, $add) =  explode(' ', trim(fgets(STDIN)));
$remove -= $ab;
$bw += min($aw, $remove);
$aw -= min($aw, $remove);
$aw += min($bw, $add);
echo $aw;
echo PHP_EOL;
0