#include <stdio.h>
long M(int p) {
    int k = 2;
    while(0 == 0){
        k++;
        if (p%(k-1) == 0){
            printf("%d ",(k-1));
            M(p/(k-1));
            break;
        }
        if (k >= p){
            printf("%d ",k);
            break;
        }
    }
}
int main() {
    M(1786);
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: