There is a popular game, named Four fours, where you have to find the shortest mathematical expression for every number from $1$ to $n$, using only the number $4$ and some operators.
My variant of this game is named Sevens, and you can only use the number $7$ and some math operators to obtain the other numbers.
Here is a list of accepted operators (along with their individual score):
- $+,-,\times, \div $ (one point)
- Parenthesis $( \ )$ (zero points)
- Exponentiation (one point)
- Square root) $\surd$ (rounded to lower integer) (two points)
- Factorial $!$ (two points)
Note: Logarithms and concatenation are explicitly not allowed! Implicit multiplication isn't allowed (eg. 7(3))
How to calculate the score?
The total score is the sum of all the partial scores you get with operations.
If you use an operation twice, you must add the partial score twice, of course.
The lower the score, the better it is!
Examples:
$7=(7+7)-7$ results in a score of $2$
$7=(7!)/(7-7/7)!$ results in a score of $7$
Your task is to generate the numbers from $1$ to $30$ achieving the minimum possible score, using only the number $7$ and the above operations.