You are viewing a single comment's thread. Return to all comments →
#include<iostream> #include<algorithm> #include<cstdio> #include<cmath> using namespace std; int main() { int m,tot; int k; cin>>m; cin>>tot; long low; long high; for(long i=0;i<tot;i++){ cin>>k; low = pow(10,(k-1)); high = pow(10,k) - 1; long temp; temp = (k-m) * 9; long tot = high-low+1; tot = tot - temp; cout<<tot%1000000007<<endl; } return 0; }
Can I know the mistake?
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #172: Investigating numbers with few repeated digits
You are viewing a single comment's thread. Return to all comments →
Can I know the mistake?