Submission #1024016

#TimeUsernameProblemLanguageResultExecution timeMemory
1024016kustizusBridž (COCI17_bridz)C++17
50 / 50
1 ms352 KiB
#include <bits/stdc++.h> #define ll long long int using namespace std; ll n,ans=0; string s; void Solve(){ cin>>s; for (ll 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+=1; } int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); cin>>n; while (n--) Solve(); cout<<ans; }

Compilation message (stderr)

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