D
deepaknaidu
OFFICIAL
12 Sep 2026, 17:34
Why does my solution TLE on the last test case?
Look for the pattern on small inputs first. Watch out for overflow; use long long in C++/Java.
Why does my solution TLE on the last test case?
Look for the pattern on small inputs first. Watch out for overflow; use long long in C++/Java.
Great explanation, the edge case with an empty input tripped me up too.
Sign in to reply.