123233
ABC 380Problem 36 of 50
EasyWhat to do
Check if a 6-digit number contains exactly one '1', exactly two '2's, and exactly three '3's (and no other digits). Return 'Yes' if it does, 'No' otherwise.
Key Concepts
if-statements
counting characters
basic input/output
string manipulation
Examples
Input:
n = 123233
Output:
Yes
Input:
n = 123234
Output:
No
Tips for Beginners
- Focus on understanding the logic, not memorizing syntax
- Use print statements to debug your code
- Don't worry about input parsing - the function handles that for you
- If stuck, try writing out your solution on paper first
Python Editor
Loading Python...