KrazyPhish
KrazyPhish
全部文章
分类
题解(4)
归档
标签
去牛客网
登录
/
注册
KrazyPhish的博客
全部文章
(共4篇)
题解 | #统计字符#
Array.every()用于对数组每个值遍历,且按回调函数的规则返回结果true/false,结果条件必须是数组中的所有值都满足,则该方法返回值才为true 与之相反的是Array.some()方法,同样遍历数组,但只需有一个满足条件即可返回true let str = readline().sp...
Javascript V8
2022-04-12
8
553
题解 | #字符统计#
let str; while( str = readline()){ let arr = str.split(''); let obj = {}; &n...
Javascript V8
2021-11-08
0
539
题解 | #记负均正II#
let num; let arr = []; let res = 0; let count = 0; while(num = parseInt(readline())){ &nbs...
Javascript V8
2021-11-08
2
383
题解 | #表示数字#
let str; while(str = readline()){ str = str.replace(/[0-9]+/g, (val) => '*' + val&nbs...
Javascript V8
2021-11-05
28
773