Please explain why my approach to LCDCT (CodeChef) is wrong

Revision en1, by siddhantuniyal, 2024-03-22 08:43:36

My Approach

The Editorial

I don't understand why inclusion-exclusion is required , shouldn't my approach work?

Please help me in understanding why my approach is wrong.

Thank You

Tags codechef, number theory

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English siddhantuniyal 2024-03-22 08:43:36 358 Initial revision (published)