How to solve Problem 1364A -XXXXX ?

Revision en1, by 150iq, 2020-06-13 21:28:07

Hello everybody,

I didn't completely understand the tutorial of Codeforces Round #649 Problem 1364A -XXXXX. Particularly, I am having trouble with this line of the tutorial. "So let the first non-multiple of x be at index l, and the last one be at index r. We must either remove the prefix all the way up to l or the suffix all the way up to r, and we'll clearly remove whichever shorter."

Could somebody please help me? I am new to codeforces and I really need help.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English 150iq 2020-06-13 21:28:07 640 Initial revision (published)