結果

問題 No.163 cAPSlOCK
ユーザー mlpj56d
提出日時 2017-06-22 10:15:03
言語 JavaScript
(node v23.5.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 526 bytes
コンパイル時間 49 ms
コンパイル使用メモリ 5,376 KB
実行使用メモリ 39,168 KB
最終ジャッジ日時 2024-10-13 00:10:15
合計ジャッジ時間 2,330 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

function Main (input) {
    var lineLength = input.length;
    var line = input.split("")

    rapt(line,lineLength);
}

function rapt(line,lineLength){
    var afterLine;
    for (var i= 0; i<= lineLength -1; i++)
        if (line[i].charCodeAt() >=65 && line[i].charCodeAt() <= 90){
                line[i] = line[i].toLowerCase();
        } else {
                line[i] = line[i].toUpperCase();
        };
    afterLine = line.join("")
    console.log(afterLine)
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
0