Tap here to switch tabs
Problem
Submissions

Problem: Sum of Digits in the Minimum Number

Sum of Digits in the Minimum Number asks you to find the smallest value in an array of positive integers, sum its digits, and return one for an even sum or zero for an odd sum.

Statement

Given an array of positive integers nums, find the minimum element in nums and compute the sum of its digits.

Return 11 if the sum of the digits is even, or 00 if the sum is odd.

Constraints:

  • 1≤1 \leq nums.length ≤100\leq 100

  • 1≤1 \leq nums[i] ≤100\leq 100

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Sum of Digits in the Minimum Number

Sum of Digits in the Minimum Number asks you to find the smallest value in an array of positive integers, sum its digits, and return one for an even sum or zero for an odd sum.

Statement

Given an array of positive integers nums, find the minimum element in nums and compute the sum of its digits.

Return 11 if the sum of the digits is even, or 00 if the sum is odd.

Constraints:

  • 1≤1 \leq nums.length ≤100\leq 100

  • 1≤1 \leq nums[i] ≤100\leq 100