1

我想计算音乐流派的受欢迎程度。我写了一个输出这个数组的代码:

Array
(
[Contemporary R&B|R&B] => Array
(
[0] => 1
[1] => 3
[2] => 6
[3] => 25
[4] => 44
[5] => 58
[6] => 69
[7] => 81
[8] => 89
[9] => 92
)

[dance-pop] => Array
(
[0] => 1
[1] => 88
)

[Disco music|disco] => Array
(
[0] => 1
)

[Pop music|Pop] => Array
(
[0] => 3
)

[Dance music|dance] => Array
(
[0] => 3
)

[Alternative hip hop] => Array
(
[0] => 6
)

[Conscious hip hop] => Array
(
[0] => 14
)

[Country music|Country] => Array
(
[0] => 22
[1] => 26
[2] => 28
[3] => 34
[4] => 39
[5] => 46
[6] => 47
[7] => 56
[8] => 57
[9] => 71
[10] => 78
[11] => 79
[12] => 95
)

[country rap] => Array
(
[0] => 22
)

[Hip hop music|Hip hop] => Array
(
[0] => 27
[1] => 37
[2] => 58
[3] => 67
[4] => 74
[5] => 86
[6] => 89
)

[Soul music|Soul] => Array
(
[0] => 29
)

[Pop music|pop] => Array
(
[0] => 29
)

[Rock and roll|Rock] => Array
(
[0] => 33
)

[Indie folk] => Array
(
[0] => 36
[1] => 73
)

[Dance-pop] => Array
(
[0] => 42
)

[hip house] => Array
(
[0] => 42
)

[electro house] => Array
(
[0] => 42
)

[Electropop] => Array
(
[0] => 49
)

[pop music|Pop] => Array
(
[0] => 50
)

[Hard rock] => Array
(
[0] => 52
[1] => 77
)

[Country rock] => Array
(
[0] => 53
)

[Alternative rock] => Array
(
[0] => 54
[1] => 96
)

[Progressive house music|Progressive house] => Array
(
[0] => 68
)

[alternative dance] => Array
(
[0] => 68
)

[folktronica] => Array
(
[0] => 68
)

[Folk music|folk] => Array
(
[0] => 68
)

[pop rock] => Array
(
[0] => 73
)

[soul music|soul] => Array
(
[0] => 73
)

[comedy hip hop] => Array
(
[0] => 74
)

[Electro house] => Array
(
[0] => 88
)

[Electronic music|electronic] => Array
(
[0] => 88
)

[Industrial hip hop] => Array
(
[0] => 97
)

“当代 R&B|R&B”(例如)中的值表示热门歌曲列表中的位置。

我知道我可以数数,但我想考虑该流派在 100 首歌曲列表中的位置。(例如:位置 2 和 3 中的“当代 R&B|R&B” = 位置 1 中的“dance-pop”。)

你能指导我解决问题吗?

4

0 回答 0