結果

問題 No.163 cAPSlOCK
ユーザー dyechidyechi
提出日時 2019-03-27 18:12:34
言語 PHP
(8.3.4)
結果
AC  
実行時間 36 ms / 5,000 ms
コード長 265 bytes
コンパイル時間 4,989 ms
コンパイル使用メモリ 32,020 KB
実行使用メモリ 31,432 KB
最終ジャッジ日時 2024-04-19 10:02:55
合計ジャッジ時間 4,876 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
31,152 KB
testcase_01 AC 34 ms
31,040 KB
testcase_02 AC 36 ms
31,396 KB
testcase_03 AC 36 ms
30,640 KB
testcase_04 AC 34 ms
30,748 KB
testcase_05 AC 34 ms
30,676 KB
testcase_06 AC 34 ms
30,668 KB
testcase_07 AC 34 ms
31,044 KB
testcase_08 AC 32 ms
30,920 KB
testcase_09 AC 34 ms
30,856 KB
testcase_10 AC 34 ms
30,956 KB
testcase_11 AC 34 ms
31,132 KB
testcase_12 AC 35 ms
30,924 KB
testcase_13 AC 34 ms
31,432 KB
testcase_14 AC 33 ms
30,860 KB
testcase_15 AC 34 ms
30,772 KB
testcase_16 AC 35 ms
30,684 KB
testcase_17 AC 33 ms
31,040 KB
testcase_18 AC 36 ms
30,972 KB
testcase_19 AC 34 ms
31,236 KB
testcase_20 AC 33 ms
30,872 KB
testcase_21 AC 35 ms
31,224 KB
testcase_22 AC 33 ms
30,776 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

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

$i=0;
while ($i < strlen($s)) {
	if (ctype_upper($array[$i]) == TRUE) {
		$array[$i] = strtolower($array[$i]);
	} else {
		$array[$i] = strtoupper($array[$i]);
	}
	$i++;
}
echo implode("", $array).PHP_EOL;
?>
0