calc24_first

Function calc24_first 

Source
pub fn calc24_first(
    goal: &Rational,
    nums: &[Rational],
    algo: Calc24Algo,
) -> String
Expand description
   let nums = (1..=3).map(|n| n.into()).collect::<Vec<_>>();
   assert_eq!(calc24_print(&5.into(), &nums, DynProg), 2);
   assert_eq!(calc24_first(&5.into(), &nums, DynProg).replace(' ', ""), "2*3-1");