using namespace std;
int main()
{
int t,a,n,m,cnt=0,cnt2=0;
cin >> t;
for(int i=0;i<t;i++)
{
cin >> a;
if(a%2==0)
{
cnt++;
n = i+1;
}
else
{
cnt2++;
m = i+1;
}
}
if(cnt==1)
cout << n << endl;
else if(cnt2==1)
cout << m << endl;
return 0;
}
We share codes. We love code. We respect programming
About Amanur Rahman
Soratemplates is a blogger resources site is a provider of high quality blogger template with premium looking layout and robust design. The main mission of templatesyard is to provide the best quality blogger templates.
No comments:
Post a Comment