Spreadsheet with Formulas
Asked at OpenAI· Screen
Reported by the problem's creator, not verified
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
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]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]