結果

問題 No.400 鏡
ユーザー seaside0002seaside0002
提出日時 2019-12-28 21:19:16
言語 PHP
(8.3.4)
結果
AC  
実行時間 50 ms / 2,000 ms
コード長 408 bytes
コンパイル時間 467 ms
コンパイル使用メモリ 32,144 KB
実行使用メモリ 31,348 KB
最終ジャッジ日時 2024-04-20 18:09:36
合計ジャッジ時間 1,453 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
30,988 KB
testcase_01 AC 48 ms
31,220 KB
testcase_02 AC 47 ms
31,348 KB
testcase_03 AC 47 ms
30,996 KB
testcase_04 AC 48 ms
31,244 KB
testcase_05 AC 47 ms
31,208 KB
testcase_06 AC 45 ms
31,012 KB
testcase_07 AC 47 ms
30,880 KB
testcase_08 AC 48 ms
30,944 KB
testcase_09 AC 45 ms
30,812 KB
testcase_10 AC 46 ms
30,968 KB
testcase_11 AC 50 ms
31,160 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$target = str_split(trim(fgets(STDIN)));

mirroring($target);

echo implode($target)."\n";


function mirroring(&$target): void{
	$target = array_reverse($target);
	$mirrorChar;
	
	for($i = 0; $i < count($target); $i++){
		$mirrorChar = changeLR($target[$i]);
		$target[$i] = $mirrorChar;
	}
	
}

function changeLR($char){
	if ($char == '<'){
		return '>';
	} else if ($char == '>'){
		return '<';
	}
}
0