Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <algorithm>
- #include <math.h>
- #include <stdio.h>
- using namespace std;
- int main()
- {
- freopen("INPUT.TXT", "r", stdin);
- freopen("OUTPUT.TXT", "w", stdout);
- long long a, b=0;
- int t=0;
- cin>>a;
- long long int m=a;
- for(int i=1; i<a; i++)
- {
- for(int j=i; j<a || b<a; j++)
- {
- b+=j;
- }
- if(b==a)
- t++;
- }
- cout<<t;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement