1 条题解
- 
  -3#include <cstdio> using namespace std; int n, ans; int main() { freopen("factor.in", "r", stdin); freopen("factor.out", "w", stdout); scanf("%d", &n); if (n == 1) { printf("1"); return 0; } for (int i = 1; i * i <= n; i++) if (!(n % i)) { ans += i; if (i * i != n) ans += n / i; } printf("%d", ans); return 0; }
信息
- ID
- 408
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 9
- 标签
- (无)
- 递交数
- 332
- 已通过
- 30
- 上传者
 
       2301011
      
                      LV 8
                    
 @ 2023-7-24 14:03:56
    
          2301011
      
                      LV 8
                    
 @ 2023-7-24 14:03:56