Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<cstdio>
- #include<algorithm>
- #include<cmath>
- #include<string>
- #include<cstring>
- #include<stdio.h>
- using namespace std;
- int main() {
- string A;
- int co = 0;
- string j[3];
- getline(cin, A);
- j[0] = "ADGJMPSVY. adgjmpsvy";
- j[1] = "BEHKNQTWZ,behknqtwz";
- j[2] = "CFILORUXZ!cfiloruxz";
- for (int i = 0; i < A.length(); i++) {
- for (int p = 1; p <= 3; p++) {
- bool f = count(j[p - 1].begin(), j[p - 1].end(), A[i]);
- if (f == 1) {
- co += p;
- break;
- }
- }
- }
- cout << co;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement