1. 题目
https://leetcode.cn/problems/implement-rand10-using-rand7/submissions/425373186/
2. 解法
class Solution extends SolBase { public int rand10() { int temp = 40; while (temp >= 40) { temp = (rand7() - 1) * 7 + rand7()-1; } return temp % 10 + 1; } }