subtask 1 and one test case of subtask 2 running for art of balance question??

long_challenge

#1

can anybody help with my code I was not able to debug it although my logic seems correct.
link to my code:>>

https://ideone.com/e.js/HiAdKh


#2

if(nfact > 26)continue; (line 28)

Remove this line of code and you’ll get an AC as number of times a letter is present can be greater than 26.