I have written solution for this easy problem and the code is also very simple, but I don’t know why it is giving TLE, please help me out🥺
Problem : SUMPOWER Problem - CodeChef
My Solution : CodeChef: Practical coding for everyone
1 Like
Do the following changes and try again.
- Use fast IO
- Use
'\n'
instead ofendl
Edit: You should pass the string as a reference.
CodeChef: Practical coding for everyone (Focus on the &
on the line 90)
3 Likes
Thank you soooo muchhh:star_struck:…I didn’t knew passing the copy of string takes much time:sweat_smile:… Thank you…
1 Like