昨晚京东前端校招编程题
var len = readInt(); var arr = readline(); function tapNum(arr) { var reg = /[a-z]*([A-Z])+[a-z]*/g; var result = arr.match(reg); return result.length + len; } print(tapNum(arr));欢迎指正讨论
var len = readInt(); var arr = readline(); function tapNum(arr) { var reg = /[a-z]*([A-Z])+[a-z]*/g; var result = arr.match(reg); return result.length + len; } print(tapNum(arr));欢迎指正讨论
相关推荐