Timeout in 546 D

Revision en1, by Kuber, 2023-07-12 06:53:27

Hi everyone, Please review my submission: https://codeforces.com/problemset/submission/546/213448834

The logic is exactly the same as that of the person who got the first position in the contest. I'm unable to understand how to change the solution to get AC.

Tags #number theory, primes, sieve of eratosthenes

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Kuber 2023-07-12 08:50:48 50 Tiny change: 'to get AC.' -> 'to get AC.\n\nEdit: Changed cout to printf and cin to scanf.'
en1 English Kuber 2023-07-12 06:53:27 279 Initial revision (published)