|  | 
|  | 
| back to board | WA47 Posted by German  27 Feb 2017 14:201) Find the prime numbers up to 10,000,100 (Sieve of Eratosthenes)2) if the sum is equal to 19 degrees, then the residue is prime to check
 What can you advise?
Re: WA47 1) Up to 10M? 2M is enough. sqrt( 10^18 / 2^18) ~= 1.5M
 2)
 "Yes" precondition: N > 1
 "Yes" condition: sum is 20 and residue is 1
 "Yes" condition: sum is 19 and residue>1 and residue is prime
 
 Could you show please code?
Re: WA47 Posted by German  27 Feb 2017 19:36 AC
 
 Edited by author 09.03.2017 18:16
Re: WA47 > if (kol == 20){
 It's suspicious a bit. Please try test (2^20)*3, expected answer is No
Re: WA47 Posted by German  1 Mar 2017 12:593145728No
 20^20 * 3^1 sum 21
 
 if I understand condition of the problem:
 3^1*5^1*7^2*11^1*17^12*23^3 answer is "Yes" ?
 
 
 
 Edited by author 01.03.2017 13:26
Re: WA47 Posted by PO  7 Dec 2018 17:07 | 
 | 
|