Skip to main content
David's Blog
About
Algorithm
Framework
Data Structure
Linear
Tree
Graph
Set
Search
DFS
BFS
FOR
Optimization
Decrease & Conquer
Dynamic Programming
Math
FAQ
Computer Science
Core
Network
Operating System
Design
Design Pattern
Object-Oriented Design
System Design
Engineering
Database
MySQL
Redis
Lang
Java
DevOps
Unix
Tools
Tests
TOEFL
LISTENING
READING
SPEAKING
WRITING
GRE
QUANTITATIVE
VERBAL
概率
David Liu
12/12/25
Less than 1 minute
概率
Rand10生成Rand7
Rand10均匀生成[1,10],生成Rand7均匀生成[1,7]
rand10()%7+1
Rand7生成Rand10
((rand7()-1)*7+rand7()
Prev
数列
Next
运算