#include<bits/stdc++.h>
using namespace std;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
long long n, m = 0;
cin >> n;
string s;
for(long i = 0; i < n; ++i){
cin >> s;
for(int j = 0; j < 13; ++j){
if(s[j] == 65) m += 4;
if(s[j] == 75) m += 3;
if(s[j] == 81) m += 2;
if(s[j] == 74) m += 1;
}
}
cout << m;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Correct |
1 ms |
512 KB |
Output is correct |
3 |
Correct |
2 ms |
512 KB |
Output is correct |
4 |
Correct |
2 ms |
604 KB |
Output is correct |
5 |
Correct |
2 ms |
604 KB |
Output is correct |
6 |
Correct |
2 ms |
672 KB |
Output is correct |
7 |
Correct |
2 ms |
672 KB |
Output is correct |
8 |
Correct |
2 ms |
736 KB |
Output is correct |
9 |
Correct |
3 ms |
808 KB |
Output is correct |
10 |
Correct |
3 ms |
880 KB |
Output is correct |