摘要: 问题描述:有一个函数,可以等概率的生成x∈(a,b),如何编写函数生成x∈(c,d) 举例f函数可以生成[1,5],生成[1,7] 1 public static int f() { 2 return (int) (Math.random() * 5) + 1; 3 } 解题思路: 通过f()改造成 阅读全文
posted @ 2025-10-09 19:27 千叶翔龙 阅读(7) 评论(0) 推荐(0)