# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
713848 | 2023-03-23T06:06:46 Z | ALTAKEXE | Bridž (COCI17_bridz) | C++14 | 3 ms | 340 KB |
#include <bits/stdc++.h> using namespace std; int main() { //freopen("input.txt","r",stdin); int n,sum=0; cin>>n; while(n--){ string a; cin>>a; for(int i=0;i<a.size();i++){ if(a[i]=='A') sum+=4; if(a[i]=='K') sum+=3; if(a[i]=='Q') sum+=2; if(a[i]=='J') sum+=1; } } cout<<sum; return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
3 | Correct | 0 ms | 212 KB | Output is correct |
4 | Correct | 1 ms | 212 KB | Output is correct |
5 | Correct | 1 ms | 212 KB | Output is correct |
6 | Correct | 1 ms | 212 KB | Output is correct |
7 | Correct | 1 ms | 212 KB | Output is correct |
8 | Correct | 1 ms | 308 KB | Output is correct |
9 | Correct | 3 ms | 340 KB | Output is correct |
10 | Correct | 3 ms | 340 KB | Output is correct |