Cody

# Problem 44065. Number of even divisors of a given number

Solution 3067858

Submitted on 5 Oct 2020 by Alex
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
filetext = fileread('countEvenDivisors.m'); assert(isempty(strfind(filetext, 'sqrt'))) assert(isempty(strfind(filetext, 'for'))) 2

ans = 2

2   Pass
n= 6880 * 2; y_correct = 24; assert(isequal(countEvenDivisors(n),y_correct)) 3

y = 24 ans = 3

3   Pass
n= 5050 * 2; y_correct = 12; assert(isequal(countEvenDivisors(n),y_correct)) 4

y = 12 ans = 4

4   Pass
n= 76576501; y_correct = 0; assert(isequal(countEvenDivisors(n),y_correct)) 5

y = 0 ans = 5

5   Pass
n= 74 * 2; y_correct = 4; assert(isequal(countEvenDivisors(n),y_correct)) 6

y = 4 ans = 6

6   Pass
n=14^8 *2 ; y_correct = 81; assert(isequal(countEvenDivisors(n),y_correct))

y = 81

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!