⚡ Build the skills to land top-paying quant jobs. Offer ends in 30d 01h 37m 45s30 days 1 hours 37 minutes 45 seconds.
A magic square is a 3-by-3 grid of numbers whose 8 lines (the 3 rows, the 3 columns and the 2 diagonals) all have the same sum.
An almost magic square is a 3-by-3 grid of positive integers whose 8 line sums differ from each other by at most 1. So there is a number S such that every line sums to either S or S+1. An exact magic square also counts as almost magic.
The board below has 3 rows and 5 columns. It contains two bold-outlined 3-by-3 squares:
The two squares share the middle column (column 3, shaded). The shared column's three cells belong to both squares.
Write a positive integer in each of the 15 cells so that:
Question: What is the smallest possible total of the 15 integers?
Answer format: a single integer.