AtCoder Beginner Contest 164 D - Multiple of 2019(数论+dp)
思路这意味着s[i,n]%p==s[j,n]%p时候,s[i,j]%p=0。代码#includetypedeflonglongll;usingnamespacestd;llN,P,cnt[200101],T[200101],ans,mod;intmain(){strings;cin>>s;N=s.size();P=2019;T[N-1]=1;for(inti=N-2;i>=0;i--)T[i]=T