Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,5 @@
def countJewels(s, j):
return sum(x in j for x in s)
print countJewels("aAAbbbb", "aA")
print countJewels("ZZ", "z")

View file

@ -0,0 +1,6 @@
def countJewels(stones, jewels):
jewelset = set(jewels)
return sum(1 for stone in stones if stone in jewelset)
print(countJewels("aAAbbbb", "aA"))
print(countJewels("ZZ", "z"))