SHOW:
|
|
- or go back to the newest paste.
| 1 | - | a = [-3,-2,1,0,8,7,1] |
| 1 | + | a = [-3,-2,1,0,8,7,1] |
| 2 | - | M = 3 |
| 2 | + | M = 3 |
| 3 | - | a =[7,1,11,8,4,10] |
| 3 | + | a =[7,1,11,8,4,10] |
| 4 | - | M=8 |
| 4 | + | M=8 |
| 5 | - | arr= [] |
| 5 | + | arr= [] |
| 6 | - | for ele in a: |
| 6 | + | for ele in a: |
| 7 | - | arr.append((ele)%M) |
| 7 | + | arr.append((ele)%M) |
| 8 | - | |
| 8 | + | |
| 9 | - | from collections import Counter |
| 9 | + | from collections import Counter |
| 10 | - | |
| 10 | + | |
| 11 | - | dic = Counter(arr) |
| 11 | + | dic = Counter(arr) |
| 12 | print(max(dic.values())) |