fork download
  1. for x in range(int(input())):
  2. p=int(input())
  3. q=list(input())
  4. result = [1,1,2,1,1,1,2,1,1,1,1,2,1,1,1,1,1,2,1,1,1,1,1,1,1,1]
  5. p=[]
  6. for x in q:
  7. p.append(result[ord(x)-97])
  8. print((2**(p.count(2)))%1000000007)
Success #stdin #stdout 0.02s 9224KB
stdin
4
5
aeiou
5
abcde
8
starters
8
codechef
stdout
1
2
4
4