This commit is contained in:
krahets
2024-04-09 20:43:40 +08:00
parent d8caf02e9e
commit a6adc8e20a
48 changed files with 1599 additions and 571 deletions
+2 -2
View File
@@ -324,7 +324,7 @@ comments: true
// 1. 统计数组最大元素 m
var m = 0
for (num in nums) {
m = max(m.toDouble(), num.toDouble()).toInt()
m = max(m, num)
}
// 2. 统计各数字的出现次数
// counter[num] 代表 num 的出现次数
@@ -822,7 +822,7 @@ $$
// 1. 统计数组最大元素 m
var m = 0
for (num in nums) {
m = max(m.toDouble(), num.toDouble()).toInt()
m = max(m, num)
}
// 2. 统计各数字的出现次数
// counter[num] 代表 num 的出现次数