| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 207727 | DodgeBallMan | Bridž (COCI17_bridz) | C++14 | 7 ms | 380 KiB | 
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int ans, n;
char s[20];
int cal( char a ) {
    if( a == 'A' ) return 4;
    else if( a == 'K' ) return 3;
    else if( a == 'Q' ) return 2;
    else if( a == 'J' ) return 1;
    return 0;
}
int main() 
{
    scanf("%d",&n);
    for( int i = 1 ; i <= n ; i++ ) {
        scanf("%s",s);
        for( int j = 0 ; j < 13 ; j++ ) ans += cal( s[j] );
    }
    printf("%d",ans);
}
Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
