Spreadsheet with Formulas

Asked at OpenAI· Screen

Reported by the problem's creator, not verified

Import another question

A Spreadsheet stores cells addressed by names like "A1" or "AA10": one or more uppercase letters followed by a row number. Each cell's content is either an integer literal such as "5" or "-3", or a formula starting with "=" that adds integer literals and cell references with "+", such as "=A1+B2+7". A cell that was never set has value 0.

Examples

  1. Example 1

    Input: init = [], operations = [["set_cell",["A1","5"]],["set_cell",["B1","=A1+2"]],["get_cell",["B1"]],["set_cell",["A1","10"]],["get_cell",["B1"]]]

    Output: [null,null,7,null,12]

  2. Example 2

    Input: init = [], operations = [["set_cell",["A1","=B2+7+C3"]],["get_cell",["A1"]],["set_cell",["C3","3"]],["get_cell",["A1"]]]

    Output: [null,7,null,10]

Import your own questions
Paste a question you were asked and get a full problem: statement, tests and a checked solution.
Import a question

Code

Loading editor…

Ln 1, Col 1

Start an attempt to use Coach.