# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
165589 | 2019-11-27T14:08:25 Z | itiam | Bridž (COCI17_bridz) | C++11 | 8 ms | 508 KB |
#include <iostream> #include <algorithm> #include <string> using namespace std; int main(){ int N,uk=0; string A; char x; cin >> N; for (int i=0;i<N;i++){ cin >> A; for (int j=0;j<A.length();j++){ x=A[j]; if (x!='X'){ //cout << "haj\n"; if (x=='J') uk+=1; else if (x=='Q') uk+=2; else if (x=='K') uk+=3; else if (x=='A') uk+=4; } } } cout << uk; return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Correct | 2 ms | 376 KB | Output is correct |
3 | Correct | 2 ms | 376 KB | Output is correct |
4 | Correct | 2 ms | 376 KB | Output is correct |
5 | Correct | 2 ms | 256 KB | Output is correct |
6 | Correct | 3 ms | 384 KB | Output is correct |
7 | Correct | 3 ms | 376 KB | Output is correct |
8 | Correct | 4 ms | 376 KB | Output is correct |
9 | Correct | 6 ms | 376 KB | Output is correct |
10 | Correct | 8 ms | 508 KB | Output is correct |