Solve physical exercise with brute force

Cannot reproduce this result. (either because it is wrong, or because I was doing something wrong), I asked myself whether it is easy to write a small program that takes all the constants and the given number and permutes it with possible operators (* / - + exp (..)), etc.) until a result is found.

Permutations of n different objects with a valid repetition are n ^ r. At least while I'm small, I think you should do it. Interestingly, someone did something similar here.

+3
source share
2 answers

Yes, it was done here: Code Golf: All + - * / Combinations for 3 integers

, , . , , , , .

+1

, , Eureqa.

+1

Source: https://habr.com/ru/post/1748231/


All Articles