Problem 42394. It's going down. We're finding simbers!
This problem is inspired by Project Euler 520: Simbers.
"We define a simber to be a positive integer in which any odd digit, if present, occurs an odd number of times, and any even digit, if present, occurs an even number of times.
For example, 141221242 is a 9-digit simber because it has three 1's, four 2's and two 4's."
Given a number, determine if it a simber or not. Please note that the number will be in string format as some of the entries may be quite long. You can assume there will be no leading zeroes in any of the numbers.
Solution Stats
Problem Comments
- 
		3 Comments
		ChrisR
    	on 24 Jul 2020
	
	
  	Is the test suite broken? The first line sets the input to 141221242 for all of the tests.
		Rafael S.T. Vieira
    	on 11 Aug 2020
	
	
  	It worked fine with me. Maybe it was fixed.
		goc3
    	on 29 Sep 2020
	
	
  	The first test case has been updated to not have global scope.
Solution Comments
Show commentsProblem Recent Solvers80
Suggested Problems
- 
         Make the vector [1 2 3 4 5 6 7 8 9 10] 51873 Solvers 
- 
         Return the first and last characters of a character array 11209 Solvers 
- 
         
         871 Solvers 
- 
         
         4311 Solvers 
- 
         
         898 Solvers 
More from this Author80
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!