correctness and the loop invariant hackerrank solution

welcome to shbcf.ru