-
-
Notifications
You must be signed in to change notification settings - Fork 291
Expand file tree
/
Copy path1085.cpp
More file actions
18 lines (16 loc) · 572 Bytes
/
1085.cpp
File metadata and controls
18 lines (16 loc) · 572 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
__________________________________________________________________________________________________
class Solution {
public:
int sumOfDigits(vector<int>& A) {
int t=*min_element(A.begin(),A.end());
int cnt=0;
while(t>0){
cnt+=t%10;
t=t/10;
}
if(cnt%2==0) return 1;
else return 0;
}
};
__________________________________________________________________________________________________
__________________________________________________________________________________________________