System Testing
0 / 11
RE
0/11 test cases passed
Submission #5
| Problem | NumReverseEasy |
|---|---|
| Handle | test-re |
| Submitted | 2026-07-05 07:56:28 |
System Messages
Test case #0 Input: 21 Input: 23 Expected: 75 Runtime error (RE exit=134); exit=137 usually means the memory limit (256 MB) was exceeded
Source Code
#include <string>
#include <algorithm>
using namespace std;
class NumReverseEasy {
public:
long long getsum(int A, int B) {
long long total = 0; if (A) abort();
for (int n = A; n <= B; n++) {
string s = to_string(n);
reverse(s.begin(), s.end());
total += max((long long)n, (long long)stoll(s));
}
return total;
}
};