2553: 数字统计

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:4 Solved:2

Description

Sample Input Copy

1
3 1
001 101

Sample Output Copy

11

HINT

【数据范围】 

对于 20%的数据:1 ≤ M ≤ 16。

对于 40%的数据:1 ≤ M ≤ 32。

对于 100%的数据:1 ≤ M ≤ 200,1 ≤ T ≤ 50。