Skip to content

Commit c77386c

Browse files
committed
[Gold IV] Title: 로또, Time: 276 ms, Memory: 69240 KB -BaekjoonHub
1 parent 33e4fa2 commit c77386c

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

백준/Gold/2758. 로또/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
### 성능 요약
66

7-
메모리: 69240 KB, 시간: 312 ms
7+
메모리: 69240 KB, 시간: 276 ms
88

99
### 분류
1010

1111
다이나믹 프로그래밍
1212

1313
### 제출 일자
1414

15-
2025년 8월 4일 00:33:24
15+
2025년 8월 4일 00:36:01
1616

1717
### 문제 설명
1818

백준/Gold/2758. 로또/로또.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ var output = ""
44

55
var dp = [[Int]](repeating: [Int](repeating: 0, count: 2001), count: 11)
66

7-
dp[0][0] = 1
7+
(1...2000).forEach { j in dp[1][j] = 1 }
88

9-
for i in 1...10 {
9+
for i in 2...10 {
1010
for j in 1...2000 {
11-
for l in stride(from: 0, through: j/2, by: 1) {
11+
for l in stride(from: 1, through: j/2, by: 1) {
1212
dp[i][j] += dp[i-1][l]
1313
}
1414
}

0 commit comments

Comments
 (0)