Advertisement
dllbridge

Untitled

Oct 15th, 2022
811
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. long long a, b, c = -1, d;
  5.  
  6. int main()
  7. {
  8.  cin >> a >> b;  
  9.  
  10.  for(int i = 0; i < 100000; i++)
  11.  {
  12.       if(a == d)
  13.       {
  14.              c++;
  15.              break;
  16.       }
  17.      
  18.       d = b % 10;
  19.  }
  20.    
  21. if(c == -1)
  22.      cout << "No" ;
  23. else
  24.      cout << "Yes";
  25.        
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement