-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path25A_IQ_Test.cpp
More file actions
57 lines (55 loc) · 1022 Bytes
/
Copy path25A_IQ_Test.cpp
File metadata and controls
57 lines (55 loc) · 1022 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#include<iostream>
#define ll long long
#define ull unsigned long long
#define pb push_back
#define fastread() (ios_base:: sync_with_stdio(false),cin.tie(NULL));
using namespace std;
void question_banale_aman()
{
int n;
cin>>n;
int arr[n];
for(int i = 0; i<n; i++)
{
cin>>arr[i];
}
int even = 0;
int odd = 0;
int ce = 0;
int co = 0;
for(int i = 0; i<n; i++)
{
if(arr[i]%2 == 0)
{
even++;
ce = i;
}
else{
odd++;
co = i;
}
}
if(even == 1)
{
cout<<ce+1<<endl;
}
else
{
cout<<co+1<<endl;
}
}
void chal_bhai_code_karte_hai()
{
int jab_tak_chalega = 1;
//cin>>jab_tak_chalega;
while(jab_tak_chalega--)
{
question_banale_aman();
}
}
signed main()
{
fastread();
chal_bhai_code_karte_hai();
return 0;
}