結果

問題 No.163 cAPSlOCK
ユーザー nohopennohopen
提出日時 2019-02-10 19:58:14
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 18 ms / 5,000 ms
コード長 384 bytes
コンパイル時間 43 ms
コンパイル使用メモリ 5,212 KB
実行使用メモリ 13,664 KB
最終ジャッジ日時 2023-09-21 09:27:39
合計ジャッジ時間 1,796 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
11,556 KB
testcase_01 AC 17 ms
11,596 KB
testcase_02 AC 17 ms
11,676 KB
testcase_03 AC 17 ms
11,756 KB
testcase_04 AC 16 ms
11,764 KB
testcase_05 AC 16 ms
11,680 KB
testcase_06 AC 16 ms
11,656 KB
testcase_07 AC 17 ms
11,764 KB
testcase_08 AC 16 ms
11,764 KB
testcase_09 AC 16 ms
11,672 KB
testcase_10 AC 16 ms
11,604 KB
testcase_11 AC 16 ms
11,672 KB
testcase_12 AC 16 ms
11,788 KB
testcase_13 AC 16 ms
11,540 KB
testcase_14 AC 15 ms
11,520 KB
testcase_15 AC 17 ms
11,704 KB
testcase_16 AC 18 ms
11,692 KB
testcase_17 AC 16 ms
11,516 KB
testcase_18 AC 16 ms
13,664 KB
testcase_19 AC 16 ms
11,688 KB
testcase_20 AC 16 ms
11,648 KB
testcase_21 AC 17 ms
11,668 KB
testcase_22 AC 16 ms
11,608 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(define (pass str)
  (list->string (map uplow (string->list str))))

(define (uplow char)
  (if (char=? char (char-upcase char)) ;charは大文字か?
      (char-downcase char)             ;大文字ならば小文字にして返す
      (char-upcase char)))             ;小文字ならば大文字にして返す

(define (main args)
  (print (pass (symbol->string (read)))) 0)
0