Doubts om problem E1165

Revision en1, by Master0fPuppets, 2021-04-15 23:47:11

Hi guys

I don't know why this solution (https://ideone.com/Q3bmkC) works and this (https://ideone.com/YJx6XI) doesn't

Both are the same idea the problem is just with the mod. I thought in the wrong solution that mod is distributed on multiplication so I didn't write (a[i]%mod *b[i]%mod) instead I wrote it as (a[i]*b[i])%mod so can someone explain it to me why this gave WA!

#### History

Revisions

Rev. Lang. By When Δ Comment
en1 Master0fPuppets 2021-04-15 23:47:11 462 Initial revision (published)