You are John McLane, and Simon Gruber is back in town.
This time he booby trapped 50 nuclear power plants across the US, and sent you a laptop he prepared, along with the following note:
Any attempt to breach any rule will trigger the fireworks. Don't test me.
- you can only run microsoft excel
- no add in allowed
- no external device
- when your sheet is ready, if I type in any positive integer ≤ 1 000 000 in cell A1, I want to see its prime factor decomposition once it has finished running
- you have 3 free formulas. For every formula you use above 3, I will blow up one plant. (one formula occupies one cell and starts with the '=' sign)
- you have 10 free static values, including the integer to be decomposed in cell A1. Any static value you use above 10, I will blow up one plant. (static values don't start with '=')
- during the development process, you are free to use as many formulas and static values as you want. I will count how many cells are used only once the sheet is finished
- an array formula of (n,m) cells is considered n*m formulas
- sheet recalculations are free (shift+f9)
- Oh, and I almost forgot: only spreadsheet calculations, no vba, no programming
How many nuclear plants are you able to save McLane?