Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- long long a, b, c = -1, d;
- int main()
- {
- cin >> a >> b;
- for(int i = 0; i < 100000; i++)
- {
- if(a == d){
- c++;
- break;
- }
- if(i == 1){b = 0}
- else d = b % 10;
- }
- if(c == -1) cout << "No";
- else cout<<"Yes";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement