#include <bits/stdc++.h>
#define int long long
#define fastio ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
using namespace std;
signed main(){
fastio
int n;
cin >> n;
int ans = 0;
for(int i = 0;i < n;i++){
string s;
cin >> s;
string t = s;
reverse(s.begin(),s.end());
if(t==s){
ans += stoll(s);
}
}
cout << ans << "\n";
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
2 ms |
332 KB |
Output is correct |
3 |
Correct |
60 ms |
5032 KB |
Output is correct |
4 |
Correct |
87 ms |
7496 KB |
Output is correct |
5 |
Correct |
116 ms |
9896 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
332 KB |
Output is correct |
3 |
Correct |
41 ms |
1696 KB |
Output is correct |
4 |
Correct |
77 ms |
3140 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
332 KB |
Output is correct |
3 |
Correct |
41 ms |
1696 KB |
Output is correct |
4 |
Correct |
77 ms |
3140 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
3 ms |
332 KB |
Output is correct |
7 |
Correct |
78 ms |
3268 KB |
Output is correct |
8 |
Correct |
93 ms |
3996 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
2 ms |
332 KB |
Output is correct |
3 |
Correct |
60 ms |
5032 KB |
Output is correct |
4 |
Correct |
87 ms |
7496 KB |
Output is correct |
5 |
Correct |
116 ms |
9896 KB |
Output is correct |
6 |
Correct |
0 ms |
204 KB |
Output is correct |
7 |
Correct |
1 ms |
332 KB |
Output is correct |
8 |
Correct |
41 ms |
1696 KB |
Output is correct |
9 |
Correct |
77 ms |
3140 KB |
Output is correct |
10 |
Correct |
1 ms |
204 KB |
Output is correct |
11 |
Correct |
3 ms |
332 KB |
Output is correct |
12 |
Correct |
78 ms |
3268 KB |
Output is correct |
13 |
Correct |
93 ms |
3996 KB |
Output is correct |
14 |
Correct |
1 ms |
204 KB |
Output is correct |
15 |
Correct |
4 ms |
588 KB |
Output is correct |
16 |
Correct |
42 ms |
4152 KB |
Output is correct |
17 |
Correct |
95 ms |
8864 KB |
Output is correct |
18 |
Correct |
113 ms |
9892 KB |
Output is correct |
19 |
Correct |
99 ms |
9888 KB |
Output is correct |
20 |
Correct |
112 ms |
9936 KB |
Output is correct |