for i in set(list): n = n if n>list.count(i) else list.count(n)
RIcter
2013 年 12 月 27 日
...缩进呢,前面应该还有个n=0..
forestkeeper
2013 年 12 月 27 日
int count = 0; int num = 0; for (int i = 0; i<n; ++i) if (count == 0) num = a[i], count = 1; else if (num == a[i]) ++count; else --count; return [count,num]