Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int sumdil(int q)
- {
- int res=1;
- for (int i=2; i<q; i++)
- {
- if (q%i==0) res+=i;
- }
- return res;
- }
- int main()
- {
- int a,b;
- cin >> a >> b;
- if (a==sumdil(b) && b==sumdil(a)) cout << 1;
- else cout << 0;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement