結果

問題 No.920 あかあお
ユーザー seaside0002seaside0002
提出日時 2019-12-30 12:11:46
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 353 bytes
コンパイル時間 222 ms
コンパイル使用メモリ 32,272 KB
実行使用メモリ 32,528 KB
最終ジャッジ日時 2024-04-25 13:37:01
合計ジャッジ時間 1,411 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
32,400 KB
testcase_01 AC 41 ms
32,528 KB
testcase_02 AC 41 ms
32,276 KB
testcase_03 AC 43 ms
32,400 KB
testcase_04 AC 40 ms
32,528 KB
testcase_05 AC 40 ms
32,400 KB
testcase_06 WA -
testcase_07 AC 40 ms
32,404 KB
testcase_08 AC 40 ms
32,528 KB
testcase_09 AC 40 ms
32,400 KB
testcase_10 AC 40 ms
32,272 KB
testcase_11 AC 41 ms
32,272 KB
testcase_12 WA -
testcase_13 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
// 連想配列で処理
list($r, $b, $w) = explode(" ", trim(fgets(STDIN)));

$balls = array(
	'red' => $r,
	'blue' => $b,
	'white' => $w,
	'violet' => 0
);

makeViolet($balls);

echo $balls['violet'];


function makeViolet(&$balls): void{
	$violets = ($balls['red'] + $balls['blue'] + $balls['white']) / 2;
	$balls['violet'] = floor($violets);
}
0