Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- int n, m, ans;
- cin >> n >> m;
- if((m % n) != 0)
- ans = m % n;
- else
- ans = n;
- cout << ans;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement