結果

問題 No.163 cAPSlOCK
ユーザー MOD9cXWdOsRxvPyMOD9cXWdOsRxvPy
提出日時 2022-10-02 18:19:36
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 17 ms / 5,000 ms
コード長 325 bytes
コンパイル時間 185 ms
コンパイル使用メモリ 5,380 KB
実行使用メモリ 11,984 KB
最終ジャッジ日時 2023-08-26 16:07:06
合計ジャッジ時間 1,919 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
11,736 KB
testcase_01 AC 16 ms
11,688 KB
testcase_02 AC 15 ms
11,648 KB
testcase_03 AC 15 ms
11,724 KB
testcase_04 AC 16 ms
11,696 KB
testcase_05 AC 17 ms
11,804 KB
testcase_06 AC 16 ms
11,924 KB
testcase_07 AC 17 ms
11,832 KB
testcase_08 AC 17 ms
11,700 KB
testcase_09 AC 17 ms
11,704 KB
testcase_10 AC 16 ms
11,696 KB
testcase_11 AC 17 ms
11,724 KB
testcase_12 AC 16 ms
11,652 KB
testcase_13 AC 16 ms
11,984 KB
testcase_14 AC 16 ms
11,708 KB
testcase_15 AC 15 ms
11,748 KB
testcase_16 AC 14 ms
11,744 KB
testcase_17 AC 15 ms
11,712 KB
testcase_18 AC 15 ms
11,648 KB
testcase_19 AC 15 ms
11,788 KB
testcase_20 AC 15 ms
11,800 KB
testcase_21 AC 16 ms
11,796 KB
testcase_22 AC 15 ms
11,656 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env gosh

(define (char-invert-capt c)
  (if (char-upper-case? c)
      (char-downcase c)
      (char-upcase c))
  )

(define (str-invert-capt str)
  (string-map (^x (char-invert-capt x)) str)
  )

(define (main _)
  (let ([str (read)])
    (display (str-invert-capt (symbol->string str)))
    )
  (newline)
  0)

0