I have WA but I dont know what is the case, I will appreciate any help
Try this:
1 5 1000000000 1234567890 1111111110 3433434340 4565656560
Expected answer:
Case 1: 6676767670