Need Help regarding TLE

Revision en1, by NGiveUp, 2021-12-15 23:03:58

Why i m getting TLE for this problem ??? and my solution is this. here preprocessing take O(n) and per query take constant time please help.

Tags math, number theory

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English NGiveUp 2021-12-15 23:03:58 279 Initial revision (published)