Easy Question - Birthday Candles

for the easy level question Birthday Candles : http://www.codechef.com/problems/CANDLE/ i have tried all the test cases that i could but i m still getting wrong answer.
Please tell me the tell case for which my code is failing or tell me the error that i am able to find.
Here is the code :

#include<iostream>
#include<math.h>
using namespace std;
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int arr[10];
        for(int i=0;i<10;i++)
            cin>>arr[i];
        int min_value=arr[1],min_index=1;
        for(int i=1;i<10;i++)
        {
            if(min_value>arr[i])
            {
                min_value=arr[i];
                min_index=i;
            }
        }
        if(min_value==0)
            cout<<min_index<<endl;
        else if(min_value!=0&&arr[0]==0)
            cout<<10<<endl;
        else if(min_value!=0&&arr[0]!=0)
        {
            if(arr[0]<min_value)
                cout<<min_index*pow(10,arr[0]+1);
            else if(arr[0]>=min_value)
            {
                for(int i=0;i<=min_value;i++)
                    cout<<min_index;
                cout<<endl;
            }
        }
    }
}

Your code fails for the test case : 1 2 2 2 2 2 2 2 2 2.

There is 1 zero and rest all are 2 in number. Your code gives answer as 10 whereas 10 can be made by using one 1 and one 0.

@admin please tell me the answer

@admin so the answer to this question should be 100 isn’t it?
please help me to get the code right