luyencode / comments

Server lưu trữ bình luận trên Luyện Code
https://luyencode.net
6 stars 3 forks source link

https://oj.luyencode.net/problem/SUMNUM #663

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Chi tiết bài tập - Luyện Code Online

https://luyencode.net/problem/SUMNUM

huydh1900 commented 2 years ago

Tham khảo: https://luyencode.net/status/ad9d9b2e8f85276662d7efeab8450846?problem=SUMNUM

vanhhn commented 2 years ago

các bạn có thể tham khảo code C https://ideone.com/fechEs

kqhuy9999 commented 1 year ago

Đây là lời giải của mình đã AC. Nếu bạn đã cố gắng mà chưa làm được thì có thể tham khảo lời giải của mình.

Xem code AC

```cpp #include using namespace std; long n,d=0; int main() { cin>>n; for (long i=1;i<=sqrt(n);i++) { if (n%i==0) {d+=i;d+=(n/i);} } long k=sqrt(n); if (k*k==n) {d-=k;} cout<