牛客431995180号
牛客431995180号
全部文章
题解
归档
标签
去牛客网
登录
/
注册
牛客431995180号的博客
全部文章
/ 题解
(共55篇)
题解 | #质数因子#
var line=readline() line=parseInt(line) var num=Math.sqrt(line) var arr=[] for(let i=2;i<=num;i++){ while(line%i===0){ arr.push(i) line=parseInt(li...
Javascript V8
2022-04-07
0
225
题解 | #字符串分隔#
var line=readline() var n=0 var len=line.length while(line.length%8!=0){ line=line.concat('0') line.length++ } for(var i=0;i<line.length;i+=8){ var...
Javascript V8
2022-04-07
0
240
题解 | #明明的随机数#
var arr=[] var line while(line=readline()){ arr.push(line) } //var len=arr[0] arr.shift() arr=[...new Set(arr)].sort((a,b)=>{ return (a-b) }).join(...
Javascript V8
2022-04-06
0
224
题解 | #计算某字符出现次数#
var line var num=0 var arr=[] while (line=readline()){ arr.push(line) } arr[0]=arr[0].toUpperCase() for(let i=0;i<arr[0].length;i++){ if(arr[1].toU...
Javascript V8
2022-04-06
0
209
题解 | #有效括号序列#
/** * @param s string字符串 @return bool布尔型 */ function isValid( s ) { // write code here var arr=[] if(s.length%2!=0){ return false }else{ for(let i=0;...
Javascript Node
2022-04-03
0
206
题解 | #模块#
{"css":"","js":"function createModule(str1, str2) {\n return {\n greeting:str1,\n name:str2,\n sayIt:function(){\n ...
HTML/CSS/JavaScript
2022-04-02
0
273
题解 | #柯里化#
{"css":"","js":"function curryIt(fn) {\n return function a(a){\n return function b(b){\n return function c(c){\n r...
HTML/CSS/JavaScript
2022-04-02
0
317
题解 | #二次封装函数#
{"css":"","js":"function partialUsingArguments(fn) {\n var arg1=[...arguments].slice(1)\n return function result(){\n var arg2=[...argume...
HTML/CSS/JavaScript
2022-04-02
0
325
题解 | #使用 arguments#
{"css":"","js":"function useArguments() {\n var sum=0\n for(let i=0;i<arguments.length;i++){\n sum+=arguments[i]\n }\n return sum\n}...
HTML/CSS/JavaScript
2022-04-02
0
267
题解 | #检查重复字符串#
{"css":"","js":"function useArguments() {\n var arr=[...arguments]\n var sum=0\n arr.forEach((item)=>{\n sum+=item\n })\n ret...
HTML/CSS/JavaScript
2022-04-02
0
274
首页
上一页
1
2
3
4
5
6
下一页
末页