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

Commit 8a63606

Browse files
Create 2094.py
1 parent 8083342 commit 8a63606

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

‎2000-2100/2094.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
class Solution(object):
2+
def findEvenNumbers(self, digits):
3+
mpp = [0]*10
4+
for d in digits:
5+
mpp[d] += 1
6+
res = []
7+
for i in range(1, 10):
8+
if mpp[i] == 0: continue
9+
mpp[i] -= 1
10+
for j in range(10):
11+
if mpp[j] == 0: continue
12+
mpp[j] -= 1
13+
for k in range(0, 10, 2):
14+
if mpp[k] == 0: continue
15+
mpp[k] -= 1
16+
res.append(i*100 + j*10 + k)
17+
mpp[k] += 1
18+
mpp[j] += 1
19+
mpp[i] += 1
20+
return res

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /