Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
217 B
1
Indexable
Never
#include <iostream>

using namespace std;

int sum_div(long long int n)
{
    int sum = 0;
    for(int i = 2; i <= n/2; i++){
        if(n%i==0){
            sum+= i;
        }
    }
    return sum+1+n;
}