My issue
Why my soln is wrong if it is successfully executing against given input
for t in range(int(input())):
n = int(input())
s = input()
v = [‘a’,‘e’,‘i’,‘o’,‘u’]
f = ‘’
for l in s:
if l not in v:
f += l
elif l in v:
break
if len(f) >= 4:
print(‘NO’)
else:
print(‘YES’)
My code
# cook your dish here
for t in range(int(input())):
n = int(input())
s = input()
v = ['a','e','i','o','u']
f = ''
for l in s:
if l not in v:
f += l
elif l in v:
break
if len(f) >= 4:
print('NO')
else:
print('YES')
Problem Link: EZSPEAK Problem - CodeChef