結果

問題 No.163 cAPSlOCK
ユーザー RinRin
提出日時 2015-09-04 21:15:20
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 23 ms / 5,000 ms
コード長 699 bytes
コンパイル時間 124 ms
コンパイル使用メモリ 5,328 KB
実行使用メモリ 11,884 KB
最終ジャッジ日時 2023-09-26 04:23:04
合計ジャッジ時間 1,781 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 23 ms
11,648 KB
testcase_01 AC 19 ms
11,840 KB
testcase_02 AC 19 ms
11,664 KB
testcase_03 AC 21 ms
11,736 KB
testcase_04 AC 20 ms
11,844 KB
testcase_05 AC 20 ms
11,620 KB
testcase_06 AC 21 ms
11,884 KB
testcase_07 AC 20 ms
11,624 KB
testcase_08 AC 20 ms
11,860 KB
testcase_09 AC 20 ms
11,532 KB
testcase_10 AC 22 ms
11,712 KB
testcase_11 AC 20 ms
11,676 KB
testcase_12 AC 19 ms
11,708 KB
testcase_13 AC 20 ms
11,840 KB
testcase_14 AC 19 ms
11,664 KB
testcase_15 AC 20 ms
11,704 KB
testcase_16 AC 20 ms
11,664 KB
testcase_17 AC 20 ms
11,652 KB
testcase_18 AC 20 ms
11,712 KB
testcase_19 AC 20 ms
11,688 KB
testcase_20 AC 22 ms
11,680 KB
testcase_21 AC 20 ms
11,808 KB
testcase_22 AC 20 ms
11,864 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(define (System.out.println x)
  (begin
    (display x)
    (newline)
  )
)

(let (
      (S (string->list (symbol->string (read))))
     )
  (let loop(
            (i 0)
            (Result '())
            )
    (if (char-upper-case? (list-ref S i))
        (if (= i (- (length S) 1))
            (System.out.println (list->string (reverse (cons (char-downcase (list-ref S i)) Result))))
            (loop (+ i 1) (cons (char-downcase (list-ref S i)) Result))
        )
        (if (= i (- (length S) 1))
            (System.out.println (list->string (reverse (cons (char-upcase (list-ref S i)) Result))))
            (loop (+ i 1) (cons (char-upcase (list-ref S i)) Result))
        )
    )
  )
)
0