跳到正文
RandNext
Esc

随机偶数或奇数

在任意范围内随机生成只有偶数或只有奇数的数字——用于数学练习和游戏。

  • 在浏览器中生成
  • 公平的密码学随机
  • 一键全部复制

你的数字

在你的浏览器中生成。按空格键再生成一次。

偶数或奇数 API

以 JSON 获取偶数或奇数结果。接口只读,少量使用无需 API 密钥,并支持跨域请求。

GET/api/v1/tools/even-or-odd
curl https://randnext.com/api/v1/tools/even-or-odd?parity=even&min=1&max=100&count=5

参数

参数类型作用(英文)默认值 / 允许的值
paritystringChoose whether every returned number must be even or odd.默认:eveneven, odd
minintegerLowest number that may be returned, inclusive.默认:1-1000000000 到 1000000000
maxintegerHighest number that may be returned, inclusive.默认:100-1000000000 到 1000000000
uniquebooleanWhen true, the response will not contain duplicate numbers.默认:truetrue 或 false
countintegerNumber of results to return.默认:11 到 50
查看参数、响应和限制 →

你可能还喜欢

使用方法

  1. 1选择偶数或奇数。
  2. 2设定范围和数量。
  3. 3点“生成”。

常见问题

真的是随机的吗?

是的。数值来自浏览器的密码学安全随机源,每个可能的值机会都相同。