Dim dic As new Dictionary(of String,Double)
Dim vs1() As String = "刘备,曹操,孙权".Split(",")
For Each dr As DataRow In DataTables("表A").DataRows
Dim vs2() As String = dr("姓名").Split(",")
For Each s As String In vs1.Intersect(vs2)
Dim i As Double = dr("嘉奖")/vs1.Intersect(vs2).count
If dic.ContainsKey(s) Then dic(s) += i Else dic.Add(s,i)
Next
Next
For Each k As String In dic.Keys '显示所有键及其对应的值
Output.Show(K & ":" & dic(k))
Next