Codeforces functionality may be limited from June 18, 19:00 (UTC) to June 19, 3:00 AM (UTC) due to technical maintenance. Polygon will work as usual. ×

Timeout in 546 D

Revision en2, by Kuber, 2023-07-12 08:50:48

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.

Edit: Changed cout to printf and cin to scanf.

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)