Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- #define f first
- #define s second
- #define mp make_pair
- #define pb push_back
- #define ll long long
- #define MOD 1000000007
- #define dbg(VAR) cerr << #VAR << " = " << (VAR) << endl;
- using namespace std;
- int n, ans;
- char ch;
- string x;
- int main()
- {
- ios_base::sync_with_stdio(0);
- cin.tie(0);
- cin >> n >> ch;
- n *= 4;
- while(n--) {
- cin >> x;
- if (x[1] == ch) {
- if (x[0] == 'A') ans += 11;
- if (x[0] == 'K') ans += 4;
- if (x[0] == 'Q') ans += 3;
- if (x[0] == 'J') ans += 20;
- if (x[0] == 'T') ans += 10;
- if (x[0] == '9') ans += 14;
- }
- else {
- if (x[0] == 'A') ans += 11;
- if (x[0] == 'K') ans += 4;
- if (x[0] == 'Q') ans += 3;
- if (x[0] == 'J') ans += 2;
- if (x[0] == 'T') ans += 10;
- }
- }
- cout << ans << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement