# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
182399 | 2020-01-09T17:11:46 Z | XmtosX | Bridž (COCI17_bridz) | C++17 | 8 ms | 376 KB |
#include <bits/stdc++.h> using namespace std; int n,ans; string s; int main() { cin >>n; while(n--) { cin >>s; for (int 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++; } } cout <<ans; return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Correct | 2 ms | 376 KB | Output is correct |
3 | Correct | 2 ms | 256 KB | Output is correct |
4 | Correct | 2 ms | 376 KB | Output is correct |
5 | Correct | 2 ms | 256 KB | Output is correct |
6 | Correct | 2 ms | 376 KB | Output is correct |
7 | Correct | 3 ms | 256 KB | Output is correct |
8 | Correct | 3 ms | 376 KB | Output is correct |
9 | Correct | 6 ms | 376 KB | Output is correct |
10 | Correct | 8 ms | 376 KB | Output is correct |