Submission #713848

#TimeUsernameProblemLanguageResultExecution timeMemory
713848ALTAKEXEBridž (COCI17_bridz)C++14
50 / 50
3 ms340 KiB
#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 (stderr)

bridz.cpp: In function 'int main()':
bridz.cpp:10:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   10 |         for(int i=0;i<a.size();i++){
      |                     ~^~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...