結果

問題 No.163 cAPSlOCK
ユーザー MOD9cXWdOsRxvPy
提出日時 2022-10-02 18:19:36
言語 Scheme
(Gauche-0.9.15)
結果
AC  
実行時間 31 ms / 5,000 ms
コード長 325 bytes
コンパイル時間 127 ms
コンパイル使用メモリ 5,120 KB
実行使用メモリ 16,000 KB
最終ジャッジ日時 2024-12-25 14:50:29
合計ジャッジ時間 2,137 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

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