Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfa7b74f

Browse files
refactor 1085
1 parent88346eb commitfa7b74f

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

‎src/main/java/com/fishercoder/solutions/_1085.java

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,5 @@
11
packagecom.fishercoder.solutions;
22

3-
/**
4-
* 1085. Sum of Digits in the Minimum Number
5-
*
6-
* Given an array A of positive integers, let S be the sum of the digits of the minimal element of A.
7-
* Return 0 if S is odd, otherwise return 1.
8-
*
9-
* Example 1:
10-
* Input: [34,23,1,24,75,33,54,8]
11-
* Output: 0
12-
* Explanation:
13-
* The minimal element is 1, and the sum of those digits is S = 1 which is odd, so the answer is 0.
14-
*
15-
* Example 2:
16-
* Input: [99,77,33,66,55]
17-
* Output: 1
18-
* Explanation:
19-
* The minimal element is 33, and the sum of those digits is S = 3 + 3 = 6 which is even, so the answer is 1.
20-
*
21-
* Note:
22-
* 1 <= A.length <= 100
23-
* 1 <= A[i].length <= 100
24-
* */
253
publicclass_1085 {
264
publicstaticclassSolution1 {
275
publicintsumOfDigits(int[]A) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp