GuardMarket

commerce.break_even

保本销量

Calculate the smallest integer unit count covering fixed costs from positive unit contribution.

Version 1.0.0确定性数据处理Backend required

使用场景 / Purpose

Commerce: break even. 本技能对提供的参数执行计算,输入输出契约如下。文档例子来自已实现函数的固定验收样例;网页本身不执行代码。

输入字段 / Parameters

字段类型要求约束与说明
fixed_cost"string"必填 Required{"minLength": 1, "maxLength": 32}
unit_price"string"必填 Required{"minLength": 1, "maxLength": 32}
variable_cost"string"必填 Required{"minLength": 1, "maxLength": 32}

输入例子 / Example input

{
  "fixed_cost": "1000.00",
  "unit_price": "30.00",
  "variable_cost": "10.00"
}

预期输出 / Expected output

{
  "units": 50,
  "revenue": "1500.00"
}
完整输入 JSON Schema
{
  "type": "object",
  "properties": {
    "fixed_cost": {
      "type": "string",
      "minLength": 1,
      "maxLength": 32
    },
    "unit_price": {
      "type": "string",
      "minLength": 1,
      "maxLength": 32
    },
    "variable_cost": {
      "type": "string",
      "minLength": 1,
      "maxLength": 32
    }
  },
  "required": [
    "fixed_cost",
    "unit_price",
    "variable_cost"
  ],
  "additionalProperties": false,
  "maxProperties": 1000
}
完整输出 JSON Schema
{
  "type": "object",
  "properties": {
    "units": {
      "type": "number",
      "minimum": -1e+100,
      "maximum": 1e+100
    },
    "revenue": {
      "type": "string",
      "minLength": 0,
      "maxLength": 128000
    }
  },
  "required": [
    "units",
    "revenue"
  ],
  "additionalProperties": false,
  "maxProperties": 1000
}