Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- typedef long long ll;
- signed main() {
- cin.tie(0)->sync_with_stdio(0);
- int n; cin >> n;
- int ans = 0;
- for (int i = 1; i * i <= n + 1; i++) {
- if ((n + 1) % i == 0) {
- ans++;
- if ((n + 1) / i != i) ans++;
- }
- }
- cout << ans << '\n';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement