lilong7676
lilong7676
全部文章
分类
题解(12)
归档
标签
去牛客网
登录
/
注册
lilong7676的博客
全部文章
(共10篇)
题解 | #字符串排序#
while(line = readline()) { var lineCount = parseInt(line) var strArr = [] while(lineCount--) { strArr.push(readline().trim()) ...
Javascript V8
2021-10-21
0
375
题解 | #句子逆序#
while(line = readline()) { var str = line.trim() var index = str.length var tempArr = [] var normalScanCount = 0 while(index-...
Javascript V8
2021-10-21
0
364
题解 | #字符个数统计#
while(line = readline()) { var str = line.trim() var length = str.length var tempMap = {} for (var i = 0; i < length; i++) { ...
Javascript V8
2021-10-21
0
334
题解 | #提取不重复的整数#
while(line = readline()) { var str = line.trim() var length = str.length var tempArr = [] while (length--) { var n = str[lengt...
Javascript V8
2021-10-21
0
358
题解 | #合并表记录#
while(line = readline()) { var rowCount = parseInt(line) var map = {} var row while(row = readline()) { var rowArr = row.split...
Javascript V8
2021-10-21
8
905
题解 | #质数因子#
while(line = readline()) { var num = parseInt(line) // 180 2 2 3 3 5 var result = [] function calc(n) { if (isPrime(n)) { ...
Javascript V8
2021-10-21
0
450
题解 | #字符串分隔#
var str while(str = readline()) { if (str.length <= 8) { calc(str); } else { var count = 0 while(true) { ...
Javascript V8
2021-10-21
0
358
题解 | #明明的随机数#
var inputArr = [] var num while(num = readline()) { if (num === '' || num === '\n' || num == undefined) { break; } inputArr.push(...
Javascript V8
2021-10-21
0
616
题解 | #计算某字母出现次数#
var str = readline().toLowerCase() var key = readline().toLowerCase() var count = 0; console.log(str.split(key).length -1)
Javascript V8
2021-10-21
181
7452
题解 | #字符串最后一个单词的长度#
var str = readline().trim(); // readline() , 从控制台读取数据 var length = str.length; var ch, index = 0; while(index < length) { ch = str[length - (in...
Javascript V8
2021-10-21
0
393