Cod sursa(job #669752)

Utilizator dutzulBodnariuc Dan Alexandru dutzul Data 27 ianuarie 2012 18:09:25
Problema GFact Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.43 kb
#include <fstream>
using namespace std;
ifstream f("gfact.in");
ofstream g("gfact.out");
int caut(int val)
{
    int step=1,i=0;
    for(;step<=LE;step*=2);

    for(;step;step/=2) if (ok(i+step)<val)
    i+=step;
}
int main()
{
    f>>P>>Q;

    while (p>1&&d*d<=p)
    {
     d++,T=0;
     while (X%prim[d]==0) X/=prim[d],T++;
     MAX=max(MAX,caut(T*Q));
    }

    f.close();
    g.close();
    return 0;
}