# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1024016 | 2024-07-15T10:38:54 Z | kustizus | Bridž (COCI17_bridz) | C++17 | 1 ms | 352 KB |
#include <bits/stdc++.h> #define ll long long int using namespace std; ll n,ans=0; string s; void Solve(){ cin>>s; for (ll i=0;i<s.size();i++) if (s[i]=='A') ans+=4; else if (s[i]=='K') ans+=3; else if (s[i]=='Q') ans+=2; else if (s[i]=='J') ans+=1; } int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); cin>>n; while (n--) Solve(); cout<<ans; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 352 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 1 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 348 KB | Output is correct |
7 | Correct | 0 ms | 348 KB | Output is correct |
8 | Correct | 1 ms | 348 KB | Output is correct |
9 | Correct | 1 ms | 348 KB | Output is correct |
10 | Correct | 1 ms | 348 KB | Output is correct |