🔥🔥🔥🔥🔥 Beat 99% 🔥🔥🔥🔥🔥 EASY 🔥🔥🔥🔥🔥🔥
\n\n\n# Code\n\nclass Solution(object):\n    def countStudents(self, students, sandwiches):\n        """\n        :type students: List[int]\n        :type sandw
[![Screenshot 2024-04-08 115334.png](https://assets.leetcode.com/users/images/9d0f7dbf-0dd8-4737-a3ce-546605e69e69_1712570051.597722.png)](https://leetcode.com/problems/number-of-students-unable-to-eat-lunch/submissions/1226577242/?envType=daily-question&envId=2024-04-08)\n\n\n# Code\n```\nclass Solution(object):\n    def countStudents(self, students, sandwiches):\n        """\n        :type students: List[int]\n        :type sandwiches: List[int]\n        :rtype: int\n        """\n        zeros = students.count(0)\n        ones = len(students) - zeros\n        for sandwich in sandwiches:\n            if sandwich == 0:\n                if zeros > 0:\n                    zeros -= 1\n                else:\n                    break\n            elif sandwich == 1:\n                if ones > 0:\n                    ones -= 1\n                else:\n                    break\n        return zeros + ones\n```
['Array', 'Stack', 'Queue', 'Simulation', 'Python', 'Python3']