Commit 17566740 by bonnieyan

add homework

parent 90594781
def numJewelsInStones(J, S):
J_length = len(J)
S_length = len(S)
if J_length > 50 or S_length > 50:
print("字符长度超长")
count = 0
for s in S:
if s in J:
count = count + 1
return count
print(numJewelsInStones("ba", "aAAbbbb"))
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment