You are viewing a single comment's thread. Return to all comments →
whats wrong in this???
import sys s = input().strip() n = int(input().strip()) list_=[] for x in set(s): for i in range(1,s.count(x)+1): list_.append((ord(x)-96)*i) for a0 in range(n): x = int(input().strip()) print( 'Yes' if x in list_ else 'No')
Seems like cookies are disabled on this browser, please enable them to open this website
Weighted Uniform Strings
You are viewing a single comment's thread. Return to all comments →
whats wrong in this???