UNUSUAL BEHAVIOUR

When i use void solve() function and write the code there it show me wrong answer , but when i write the same code in main function without void solve() function it show correct . Please🙏 tell me why is it so ?
using void solve() [wrong] : CodeChef: Practical coding for everyone
without void solve() [correct] : CodeChef: Practical coding for everyone

So that anyone who answers doesn’t have to start from scratch:

2 Likes