#include <stdio.h>
int tonguoc(int n){
int tong = 0;
for(int i = 1; i <= n; i++){
if(n % i == 0){
tong += i;
}
}
return tong;
}
int main(){
int N = 60;
printf("Tong uoc cua N : %d\n", tonguoc(N));
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgdG9uZ3VvYyhpbnQgbil7CiAgICBpbnQgdG9uZyA9IDA7CiAgICBmb3IoaW50IGkgPSAxOyBpIDw9IG47IGkrKyl7CiAgICAgICAgaWYobiAlIGkgPT0gMCl7CiAgICAgICAgICAgIHRvbmcgKz0gaTsKICAgICAgICB9CiAgICB9CiAgICByZXR1cm4gdG9uZzsKfQoKaW50IG1haW4oKXsKICAgIGludCBOID0gNjA7CiAgICBwcmludGYoIlRvbmcgdW9jIGN1YSBOIDogJWRcbiIsIHRvbmd1b2MoTikpOwp9