Submission #165589

#TimeUsernameProblemLanguageResultExecution timeMemory
165589itiamBridž (COCI17_bridz)C++11
50 / 50
8 ms508 KiB
#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 (stderr)

bridz.cpp: In function 'int main()':
bridz.cpp:14:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int j=0;j<A.length();j++){
                      ~^~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...