#include <stdio.h> #include <cstdint> using namespace std; int main() { uint32_t n; scanf("%u", &n); uint32_t total = 0; for (uint32_t a = 1; a <= n / 7; ++a) { if (n % a != 0) continue; uint32_t reminder = n / a - 1; if (reminder < 6) continue; for (uint32_t n = 2; n <= reminder / 3; ++n) { if (reminder % n == 0) ++total; } } printf("%u\n", total); return 0; }
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #include <stdio.h> #include <cstdint> using namespace std; int main() { uint32_t n; scanf("%u", &n); uint32_t total = 0; for (uint32_t a = 1; a <= n / 7; ++a) { if (n % a != 0) continue; uint32_t reminder = n / a - 1; if (reminder < 6) continue; for (uint32_t n = 2; n <= reminder / 3; ++n) { if (reminder % n == 0) ++total; } } printf("%u\n", total); return 0; } |