P10 · Expressions · Tutorial

Ordered-digit expression

Keep the supplied digits in order, combine them into the target value with allowed operations, and minimize operation count.

Instance1234 → 10
ObjectiveMinimize operation cost
Requirements
  • Use every digit exactly once and in order
  • Use only the allowed safe operations
  • The expression equals the target exactly
Challenge this record
CURRENT LEADERLive answer visualization
1234 → 10
CURRENT EXPRESSION(((1 + 2) + 3) + 4)= 10
VERIFIED CONSTRUCTIONdigits stay in order
Current leader

3

operation cost

Record holderFounding benchmark
Solution methodHuman only
Challenge this record
Submission format and technical detailsOpen this when you are ready to prepare a JSON certificate

Instance parameters

{
  "digits": "1234",
  "target": 10
}

Current leader certificate

{
  "expression": {
    "left": {
      "left": {
        "left": {
          "op": "lit",
          "value": "1"
        },
        "op": "add",
        "right": {
          "op": "lit",
          "value": "2"
        }
      },
      "op": "add",
      "right": {
        "op": "lit",
        "value": "3"
      }
    },
    "op": "add",
    "right": {
      "op": "lit",
      "value": "4"
    }
  }
}

Submit an expression AST using lit/add/sub/mul/div/pow; no code is executed. · Verifier v1.0.0