#
# 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
#
# 
# @param students int整型一维数组 
# @param sandwiches int整型一维数组 
# @return int整型
#
class Solution:
    def countStudents(self , students: List[int], sandwiches: List[int]) -> int:
        # write code here
        count=0
        n=len(students)
        for _ in range(n*n):
            #当学生队列为空,证明所有人都拿到了,返回0
            if len(students)==0:
                return 0
            #记录拿到了的
            if students[0]==sandwiches[0]:
                count+=1
                students.remove(students[0])
                sandwiches.remove(sandwiches[0])
                print("stu",end='')
                print(students)
                print("sad",end='')
                print(sandwiches)
            #没有拿到的人拍最后去
            else:
                students.append(students[0])
                students.remove(students[0])
                print("stu",end='')
                print(students)
                print("sad",end='')
                print(sandwiches)
        return n-count