I tried brut force but only passed few test case I used fast input output , and long long.
please help me to find solution .
Q )
constrain
sample i/o