Project Euler #172: Investigating numbers with few repeated digits

  • + 1 comment
    #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?