寻找 24 点的最佳解法。
寻找最佳解法时首先考察运算过程中是否出现负数(不出现较好),再考察运算过程中是否出现分数(不出现较好),最后考察使用的加减运算数量(越多越好,即乘除越少越好)。
$ g++ ./24.cpp -Wall -std=c++17 -O3 -o ./24
$ ./24包含了最佳解法的 24.txt 和 24.md 将会被生成在同一目录下。
MIT
Find the best solutions of 24.
The best solution comes with no negative number during the calculation process (if possible), no fractions during the calculation process (if possible) and the most plus and minus operators (or the fewest multiply and divide operators).
$ g++ ./24.cpp -Wall -std=c++17 -O3 -o ./24
$ ./24The 24.txt and 24.md which contain the best solutions will be generated in the same directory.
MIT