Submission #23077

#TimeUsernameProblemLanguageResultExecution timeMemory
23077model_codeBridž (COCI17_bridz)C++11
50 / 50
3 ms2020 KiB
#include <iostream> using namespace std; int n; int points; string s; string rate = "JQKA"; int find(char c){ for (int i=0;i<4;i++){ if (rate[i]==c){ return i+1; } } return 0; } int main (void){ cin >> n; for (int i=0;i<n;i++){ cin >> s; for (int j=0;j<13;j++){ points+=find(s[j]); } } cout << points << endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...