Tap here to switch tabs
Problem
Submissions

Problem: Count Integers With Even Digit Sum

med
30 min
Try to solve the Count Integers With Even Digit Sum problem.

Statement

Given a positive integer num, return the count of positive integers less than or equal to num whose sum of digits is an even number.

The digit sum of a positive integer is defined as the sum of all its individual digits.

Constraints:

  • 1≤1 \leq num ≤1000\leq 1000

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Count Integers With Even Digit Sum

med
30 min
Try to solve the Count Integers With Even Digit Sum problem.

Statement

Given a positive integer num, return the count of positive integers less than or equal to num whose sum of digits is an even number.

The digit sum of a positive integer is defined as the sum of all its individual digits.

Constraints:

  • 1≤1 \leq num ≤1000\leq 1000