pls someone tell why i m getting WA, the approach is same as unofficial editorial
i think i m doing mistake in implementing modulo, pls check it once
#include<bits/stdc++.h>
using namespace std;
#define mod 1000000007
typedef long long int ll;
int main()
{
ll ten[100005];
ten[0]=1;
for(ll i=1;i<100005;i++)
ten[i]=(ten[i-1]*10)%mod;
ll t;
cin>>t;
while(t–)
{
char s[100005];
cin>>s;
ll m=0;
ll l;
for(l=0;s[l]!=’\0’;l++);
for(ll i=0;s[i]!=’\0’;i++)
m+= ( (s[i]-48) * ten[l-1-i] )%mod;
ll temp=m;
for(ll i=0;i<l-1;i++)
{
m=( ( (m-(s[i]-48) * ten[l-1]) mod ) * 10 ) mod+(s[i]-48)%mod;
m%=mod;
temp=( ( temp*ten[l])%mod+m)%mod;
}
cout<<temp%mod<<endl;
}
return 0;
}