Ad
  • Custom User Avatar

    Well, the random_tests actually sometimes include input that is <= 2!
    Thus the statement N will be greater than 2 is incorrect!

    E.g. this code in Rust:

    fn angle(n: u32) -> u32 {
        assert!(n > 2, "invalid input: n must be bigger than 2");
        // ...
    }
    

    sometimes does not pass the random_tests and says:

     Test Failed
    invalid input: n must be bigger than 2
    
  • Custom User Avatar

    See my other solution, it is better