結果

問題 No.380 悪の台本
ユーザー TksiTksi
提出日時 2019-03-04 01:22:24
言語 JavaScript
(node v21.7.1)
結果
AC  
実行時間 237 ms / 1,000 ms
コード長 484 bytes
コンパイル時間 162 ms
コンパイル使用メモリ 6,944 KB
実行使用メモリ 61,904 KB
最終ジャッジ日時 2024-04-21 02:30:07
合計ジャッジ時間 1,873 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
38,656 KB
testcase_01 AC 57 ms
38,784 KB
testcase_02 AC 58 ms
39,424 KB
testcase_03 AC 58 ms
38,656 KB
testcase_04 AC 68 ms
40,320 KB
testcase_05 AC 89 ms
46,976 KB
testcase_06 AC 96 ms
47,232 KB
testcase_07 AC 237 ms
61,904 KB
testcase_08 AC 74 ms
41,192 KB
testcase_09 AC 86 ms
42,112 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

const re = {
  digi: /nyo[!-\/,:-@,\[-`,{-~]{0,3}$/ig,
  petit: /nyu[!-\/,:-@,\[-`,{-~]{0,3}$/ig,
  rabi: /[a-z,0-9]/ig,
  gema: /gema[!-\/,:-@,\[-`,{-~]{0,3}$/ig,
  piyo: /pyo[!-\/,:-@,\[-`,{-~]{0,3}$/ig
}

console.log(
  require('fs')
  .readFileSync('/dev/stdin', 'utf8')
  .split('\n')
  .slice(0, -1)
  .map(v => v.split(' '))
  .map(v => v.slice(1, v.length)
    .join ``
    .match(re[v[0]]) &&
    v.length > 1 && re[v[0]] ?
    'CORRECT (maybe)' : 'WRONG!')
  .join('\n')
);
0