Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include <algorithm>
  2. #include <iostream>
  3. #include <vector>
  4.  
  5. using std::string;
  6. using std::cin;
  7. using std::cout;
  8.  
  9. int main() {
  10. string j, s;
  11. cin >> j >> s;
  12.  
  13. int result = 0;
  14. for (const char ch : s) {
  15. result += j.find(ch) != string::npos;
  16. }
  17.  
  18. cout << result;
  19.  
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement