#include <iostream> int main() { std::cout.sync_with_stdio(false); int n; std::cin >> n; int ilosc = 0; for(int x = 1; x * 7 <= n; ++x) { if(n % x) continue; int temp = n / x - 1; for(int a = 2; a * 3 <= temp; ++a) { if(temp % a) continue; ++ilosc; } } std::cout << ilosc; 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 31 | #include <iostream> int main() { std::cout.sync_with_stdio(false); int n; std::cin >> n; int ilosc = 0; for(int x = 1; x * 7 <= n; ++x) { if(n % x) continue; int temp = n / x - 1; for(int a = 2; a * 3 <= temp; ++a) { if(temp % a) continue; ++ilosc; } } std::cout << ilosc; return 0; } |