답안 #89461

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
89461 2018-12-15T00:30:35 Z duva02 Bridž (COCI17_bridz) C++14
50 / 50
3 ms 868 KB
#include<bits/stdc++.h>

using namespace std;

int main()
{
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, i, A = 4, K = 3, Q = 2, J = 1, X =0,br = 0, j;
  string k;
  cin >> n;
  for(i = 0;i < n;i++){
  	cin >> k;
  	for( j = 0; j < 13;j++){
  		if(k[j] == 65) br += A;
  		if(k[j] == 75) br += K;
  		if(k[j] == 81) br += Q;
  		if(k[j] == 74) br += J;
	  }
  }
  cout << br;

  return 0;
}


Compilation message

bridz.cpp: In function 'int main()':
bridz.cpp:9:41: warning: unused variable 'X' [-Wunused-variable]
   int n, i, A = 4, K = 3, Q = 2, J = 1, X =0,br = 0, j;
                                         ^
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 504 KB Output is correct
3 Correct 2 ms 592 KB Output is correct
4 Correct 2 ms 592 KB Output is correct
5 Correct 2 ms 592 KB Output is correct
6 Correct 2 ms 592 KB Output is correct
7 Correct 2 ms 592 KB Output is correct
8 Correct 3 ms 696 KB Output is correct
9 Correct 3 ms 696 KB Output is correct
10 Correct 3 ms 868 KB Output is correct