結果

問題 No.163 cAPSlOCK
ユーザー swyroak
提出日時 2021-08-03 23:18:29
言語 JavaScript
(node v23.5.0)
結果
AC  
実行時間 64 ms / 5,000 ms
コード長 521 bytes
コンパイル時間 100 ms
コンパイル使用メモリ 6,816 KB
実行使用メモリ 39,040 KB
最終ジャッジ日時 2024-09-16 14:59:18
合計ジャッジ時間 2,187 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

"use strict";
function Main(input) {
    const series = input.split('');
    const ans = series.map(e => {
        if (/[A-Z]/.test(e)) {
            return e.toLowerCase();
        }
        else {
            return e.toUpperCase();
        }
    }).reduce((accum, current) => {
        return accum + current;
    }, "");
    process.stdout.write(ans);
}
//テストの入力を受け取る
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//Main("CapsLock");
//# sourceMappingURL=index.js.map
0