結果

問題 No.163 cAPSlOCK
ユーザー takeya_okino
提出日時 2017-07-14 16:33:27
言語 PHP
(843.2)
結果
AC  
実行時間 38 ms / 5,000 ms
コード長 243 bytes
コンパイル時間 207 ms
コンパイル使用メモリ 32,276 KB
実行使用メモリ 32,528 KB
最終ジャッジ日時 2024-10-07 21:43:00
合計ジャッジ時間 1,981 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$s = trim(fgets(STDIN));
$ans = "";
for($i = 0; $i < strlen($s); $i++) {
  $str = $s[$i];
  $big = strtoupper($str);
  $small = strtolower($str);
  if($str == $big) {
    $ans .= $small;
  } else {
    $ans .= $big;
  }
}
print($ans);
?>
0