結果

問題 No.163 cAPSlOCK
ユーザー irisAsh
提出日時 2017-08-31 00:08:12
言語 JavaScript
(node v23.5.0)
結果
AC  
実行時間 63 ms / 5,000 ms
コード長 292 bytes
コンパイル時間 35 ms
コンパイル使用メモリ 6,692 KB
実行使用メモリ 39,424 KB
最終ジャッジ日時 2024-10-13 00:25:23
合計ジャッジ時間 2,232 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

let s = require('fs').readFileSync('/dev/stdin', 'utf8').split('\n')[0]
let a = 'a'.charCodeAt(0)
let z = 'z'.charCodeAt(0)
let o = ""
Array.prototype.forEach.call(s, (e) => {
  let c = e.charCodeAt(0)
  if (a <= c && c <= z) o += e.toUpperCase()
  else o += e.toLowerCase()
})
console.log(o)
0