結果

問題 No.163 cAPSlOCK
ユーザー swyroak
提出日時 2021-08-03 23:10:02
言語 JavaScript
(node v23.5.0)
結果
WA  
実行時間 -
コード長 523 bytes
コンパイル時間 66 ms
コンパイル使用メモリ 5,376 KB
実行使用メモリ 39,424 KB
最終ジャッジ日時 2024-09-16 14:59:12
合計ジャッジ時間 2,440 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 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;
    }, "");
    console.log(ans);
}
//テストの入力を受け取る
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//Main("SINginG In The raIn");
//# sourceMappingURL=index.js.map
0