Untitled

mail@pastecode.io avatar
unknown
plain_text
6 months ago
1.2 kB
3
Indexable
Never
#include<stdio.h>

int main()
{
    int a, b, c, m, x;
    m = 0;
    for(a=190; a <= 220; a++)
    {
        b=0;
        printf("%d", a);
        for(c=2; c<a; c++)
        {
            if(a%c==0 && b==0)
            {
                printf("%5d", c);
                b++;
                c++;
                break;
            }
            if(c==a-1)
                printf("%23d\n", b);
        }
        while(c<a)
        {
            if(a%c == 0 && b%4 != 0)
            {
                printf(",%3d", c);
                b++;
            }
            else if(a%c == 0 && b%4 == 0)
            {
                printf(",\n%8d", c);
                b++;
            }
            if(c == a-1)
            {
                b-=1;
                if(b%4 == 0)
                    printf("%18d\n", b+1);
                if(b%4 == 1)
                    printf("%14d\n", b+1);
                if(b%4 == 2)
                    printf("%10d\n", b+1);
                if(b%4 == 3)
                    printf("%6d\n", b+1);
                if(b+1>=m)
                {
                    m=b+1;
                    x=a;
                }
            }
            c++;
        }
    }
    printf("\n%d\n",x);
    return 0;
}