Skip to content

Commit 26299b5

Browse files
authored
Update Solution.kt
1 parent f631bcd commit 26299b5

File tree

1 file changed

+2
-2
lines changed
  • src/main/kotlin/g0401_0500/s0470_implement_rand10_using_rand7

1 file changed

+2
-2
lines changed

src/main/kotlin/g0401_0500/s0470_implement_rand10_using_rand7/Solution.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ import java.util.Random
1414
class Solution {
1515
private val random: Random = Random()
1616
fun rand10(): Int {
17-
var r1 = 0
17+
var r1
1818
do {
19-
var r2 = 0
19+
var r2
2020
do { r2 = rand7() } while (r2 == 7)
2121
if (r2 in 1..3) { r1 = rand7() } else { r1 = 7 + rand7() }
2222
} while (r1 > 10)

0 commit comments

Comments
 (0)