結果

問題 No.163 cAPSlOCK
ユーザー Rin
提出日時 2015-09-04 21:15:20
言語 Scheme
(Gauche-0.9.15)
結果
AC  
実行時間 24 ms / 5,000 ms
コード長 699 bytes
コンパイル時間 98 ms
コンパイル使用メモリ 6,944 KB
実行使用メモリ 16,000 KB
最終ジャッジ日時 2024-07-18 23:44:54
合計ジャッジ時間 1,309 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

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