Codeforces Round 647 Div 2 Problem C

same pinch :slight_smile:

Yaā€¦I forgot himā€¦He must know.

I think he is not online now. I already tagged him at the start only.

Iā€™d call it undefined behavior, but I donā€™t know what Iā€™m talking about eitherā€¦ trust @ssjgz

3 Likes

wait for himā€¦I am going to sleep. Good Night!!

1 Like

Let leave this to cc and cf and gud night

4 Likes

@galencolin a small question help me plzz ā€¦

Given two no. A and B check whether A! % B ==0 ? or not

0<= A , B <= 10^(18) ?

How can i do this

Was about to answer, but first, source please

I increase A and B to MAX ie., 10^ 18 then how can i solve

I use this : https://www.geeksforgeeks.org/largest-power-k-n-factorial-k-may-not-prime/

But it works only for N upto 10^12

I mean, you could just extend the given solution with fast factorization

and also above GFG approach not worked for this questionā€¦how can i do this and even for bigger constraints :thinking:

Ok the i use above link if i need for bigger constraints but for now how can i solve , the gfg approach gave TLE :frowning_face:

Replace their prime factorization with this, the one on that page is bad

Yeah it works ā€¦thanks @galencolin i will read fast prime facto ā€¦ :slight_smile: