Submission #713841

#TimeUsernameProblemLanguageResultExecution timeMemory
713841Dulguun88Bridž (COCI17_bridz)C++14
0 / 50
1 ms212 KiB
#include <iostream> using namespace std; int main(){ int n,cnt=0; for(int i=1 ; i<=n;i++){ for(int j=1;j<=13;j++){ char c; cin>>c; if(c=='A') cnt+=4; else{ if(c=='K') cnt+=3; else{ if(c=='Q') cnt+=2; else{ if(c=='J') cnt++; } } } } } cout<<cnt; }

Compilation message (stderr)

bridz.cpp: In function 'int main()':
bridz.cpp:5:19: warning: 'n' is used uninitialized in this function [-Wuninitialized]
    5 |    for(int i=1 ; i<=n;i++){
      |                  ~^~~
#Verdict Execution timeMemoryGrader output
Fetching results...