結果
| 問題 | No.163 cAPSlOCK |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-08-05 11:33:22 |
| 言語 | OCaml (5.5.0) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 5,000 ms |
| + 237µs | |
| コード長 | 473 bytes |
| 記録 | |
| コンパイル時間 | 161 ms |
| コンパイル使用メモリ | 22,696 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-09-12 07:53:36 |
| 合計ジャッジ時間 | 1,592 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
コンパイルメッセージ
ocamlfind: [WARNING] Cannot read directory ./stublibs which is mentioned in ld.conf
ソースコード
let () =
let rec charlist_of_string str n i =
if i = n then [] else str.[i] :: charlist_of_string str n (i+1) in
let rec convert lst = match lst with
| [] -> ""
| h :: t ->
if h = Char.lowercase_ascii h then (Char.escaped (Char.uppercase_ascii h)) ^ convert t
else (Char.escaped (Char.lowercase_ascii h)) ^ convert t in
Scanf.scanf "%s\n" @@ fun s ->
let lst = charlist_of_string s (String.length s) 0 in
Printf.printf "%s\n" (convert lst)