Skip to content

Commit a433bf3

Browse files
Merge pull request #2034 from CodingTestStudy2/최민지
[최민지] Day15
2 parents ce1b1d0 + 52d5a3f commit a433bf3

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

‎leetcode3/최민지/357.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class Solution:
2+
def countNumbersWithUniqueDigits(self, n: int) -> int:
3+
if n == 0:
4+
return 1
5+
else:
6+
return (10 ** n) - (9 * n)

‎leetcode3/최민지/70.py‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
class Solution:
2+
def climbStairs(self, n: int) -> int:
3+
dp = [0] * (n+1)
4+
dp[1] = 1
5+
dp[2] = 2
6+
for i in range(3, n+1):
7+
dp[i] = dp[i-1] + dp[i-2]
8+
return dp[n]
9+
10+
11+
12+
13+

0 commit comments

Comments
 (0)