Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int l, r;
- cin >> l >> r;
- int pomosna_l = l;
- int ok = 1;
- while(l > 0)
- {
- int cifra = l % 10;
- if(cifra == 0)
- {
- ok = 0;
- break;
- }
- if (pomosna_l % cifra != 0)
- {
- ok = 0;
- }
- l /= 10;
- }
- if (ok == 0)
- {
- cout << "NE E ZIMSONOV" << endl;
- }
- else {cout << "ZIMSONOV" << endl;}
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement