DCP-231

Dev Skill archived problems can be discussed here.

DCP-231

by seyedssz » Wed Jan 18, 2017 9:11 pm

Hello .
Today I see the new problem DCP-231 and get AC in this But with an Wrong solution.
I think that there are 4 states:
1. there should be " p! " instead of " p" in statements.
2. The test cases are so very week.
3. I am Wrong :D
4. Other... :))

In the test with :
n = 100
p = 50
my code ans is "2".
But in the problem statements there will be so clear that n! can divisible a bigger power of p (check it) ans so check the judge solution. Tnks a lot.
 
Posts: 17
Joined: Sun Jan 01, 2017 12:28 pm

Re: DCP-231

by seyedssz » Fri Jan 27, 2017 6:21 pm

I still Think that There is something wrong in this problem as I said.
Anyone to check it???
 
Posts: 17
Joined: Sun Jan 01, 2017 12:28 pm

Re: DCP-231

by haasib » Sun Jan 29, 2017 2:18 pm

Yes. The way to find the maximum power for non-prime number is different. I had solved it with the different algorithm for non-prime & prime numbers. But I got WA. Then I submitted only with the prime algorithm & got AC.
With due respect, I think there is something wrong with the problem.
 
Posts: 10
Joined: Tue Sep 27, 2016 2:26 am

Re: DCP-231

by seyedssz » Sun Jan 29, 2017 5:18 pm

So, in DCP-140 that is very similar(Maybe they are same)...The "p" given when it is prime.
 
Posts: 17
Joined: Sun Jan 01, 2017 12:28 pm


Who is online
Users browsing this forum: No registered users and 1 guest
cron