ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 2102. Michael and Cryptography

WA#54
Posted by Delta67 18 Apr 2017 08:13
What's the test like?
Re: WA#54
Posted by Mahilewets 18 Apr 2017 10:59
Very stupid algo that in a single loop from i=2 to 2*10^6 checks whether i|N works
Because of if we take any combination Factor[20] of primes where at least one Factor[j]>2*10^6 than product of Factor[j] larger than 10^18.
Re: WA#54
Posted by Marginean Ciprian 3 May 2017 03:26
Try tests like 2^18 multiplied with twin primes, all should yield yes.
Test cases:
3932160
3145728
7864320
34603008
80216064
228065280
451411968
927989760
1340080128
2700607488
3029336064
4956094464
5858918400
8446279680
9613344768
10225188864
13567524864
15036579840
19039518720
20772814848
25436356608
31655460864
46132101120
48809115648
55831953408
71293206528
85021163520
94214553600
99957080064
107878023168
114016911360
171780341760
176911024128
179504676864
192756056064
203696898048
All yes.
Re: WA#54
Posted by Marginean Ciprian 4 May 2017 16:58
The thing is you should go up to sqrt(n/(2^18)) not sqrt(n/(2^19)).