get the idea

Revision en1, by vsanjay_nitdgp, 2015-08-08 18:41:32

Sir..I tried the below question ..I got the correct answer for all test cases.but I got TLE due to constraints..then I saw some users solutions..they did that problem with a formula...but I wonder what is that formula....could any one explain how to get AC with in time limit.. https://www.codechef.com/PROCON15/problems/PRCNSR1

Thanks

Tags basic math

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English vsanjay_nitdgp 2015-08-08 18:42:44 54
en1 English vsanjay_nitdgp 2015-08-08 18:41:32 351 Initial revision (published)