buggy_code
stringlengths
11
625k
fixed_code
stringlengths
17
625k
bug_type
stringlengths
2
4.45k
language
int64
0
8
token_count
int64
5
200k
#include <bits/stdc++.h> using namespace std; int main() { int n, a, an = 0; cin >> n; for (int i = 0; i < n; i++) { cin >> a; if (i % 2 == 1 && a % 2 == 1) an++; } cout << an << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n, a, an = 0; cin >> n; for (int i = 0; i < n; i++) { cin >> a; if (i % 2 == 0 && a % 2 == 1) an++; } cout << an << endl; }
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
68
import java.util.Scanner; import java.util.Set; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = Integer.parseInt(scanner.nextLine()); String[] tmp = scanner.nextLine().split(" "); int ans = 0; for (int i = 0; i < n; i++) { ...
import java.util.Scanner; import java.util.Set; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = Integer.parseInt(scanner.nextLine()); String[] tmp = scanner.nextLine().split(" "); int ans = 0; for (int i = 0; i < n; i++) { ...
[["+", 15, 15, 0, 16, 31, 16, 31, 23, 0, 24], ["+", 0, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 16, 31, 16, 31, 23, 0, 16, 12, 499], ["+", 15, 15, 0, 16, 31, 16, 31, 23, 0, 25]]
3
135
// // Created by 10940 on 2020/7/11. // #include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; int a[200]; int ans = 0; for (int i = 0; i < N; i++) { cin >> a[i]; if (i % 2 != 0 && a[i] % 2 != 0) { ans++; } } cout << ans; return 0; }
// // Created by 10940 on 2020/7/11. // #include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; int a[200]; int ans = 0; for (int i = 1; i <= N; i++) { cin >> a[i]; if (i % 2 != 0 && a[i] % 2 != 0) { ans++; } } cout << ans; return 0; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
85
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; int main() { int n; cin >> n; vector<int> a(n); rep(i, n) cin >> a[i]; int ans = 0; rep(i, n) { if ((i + 1) % 2 == 1) { if (a[i + 1] % 2 == 1) { ans++; } } } ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; int main() { int n; cin >> n; vector<int> a(n); rep(i, n) cin >> a[i]; int ans = 0; rep(i, n) { if ((i + 1) % 2 == 1) { if (a[i] % 2 == 1) { ans++; } } } cou...
[["-", 31, 16, 31, 69, 341, 342, 0, 16, 17, 72], ["-", 31, 16, 31, 69, 341, 342, 0, 16, 12, 13]]
1
110
#include <stdio.h> int main(int argc, const char *argv[]) { int N = 0; int i = 0; int cou = 0; scanf("%d", &N); int a[N]; for (i = 1; i <= N; i++) { scanf("%d", &a[i]); } for (i = 0; i < N; i++) { if (a[i] % 2 == 1 && N % 2 == 1) { cou++; } } printf("%d", cou); return 0; }
#include <stdio.h> int main(int argc, const char *argv[]) { int N = 0; int i = 0; int cou = 0; scanf("%d", &N); int a[N]; for (i = 1; i <= N; i++) { scanf("%d", &a[i]); } for (i = 1; i <= N; i++) { if (a[i] % 2 == 1 && i % 2 == 1) { cou++; } } printf("%d", cou); return 0; }
[["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["-", 15, 23, 0, 16, 12, 16, 31, 16, 31, 22], ["+", 15, 23, 0, 16, 12, 16, 31, 16, 31, 22]]
0
125
#include <algorithm> #include <cmath> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < (n); ++i) #define all(x) (x).begin(), (x).end() using namespace std; using ll = long long; using P = pair<int, int>; con...
#include <algorithm> #include <cmath> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < (n); ++i) #define all(x) (x).begin(), (x).end() using namespace std; using ll = long long; using P = pair<int, int>; con...
[["+", 31, 16, 31, 23, 0, 16, 31, 23, 0, 24], ["+", 31, 23, 0, 16, 31, 23, 0, 16, 17, 72], ["+", 31, 23, 0, 16, 31, 23, 0, 16, 12, 13], ["+", 31, 16, 31, 23, 0, 16, 31, 23, 0, 25]]
1
152
#include <algorithm> #include <cmath> #include <iostream> #include <limits> #include <numeric> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < (int)(n); i++) typedef long long ll; using namespace std; int main() { ll n, cunt = 0; cin >> n; vector<int> a(n); for (ll i = 0; i < n; i++) {...
#include <algorithm> #include <cmath> #include <iostream> #include <limits> #include <numeric> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < (int)(n); i++) typedef long long ll; using namespace std; int main() { ll n, cunt = 0; cin >> n; vector<int> a(n); for (ll i = 1; i <= n; i++) ...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
113
import numpy as np n = int(input()) a = list(map(int, input().split())) a = [a[i] for i in range(n) if i % 2 == 1] a = np.array(a) ans = np.sum(a % 2 == 1) print(ans)
import numpy as np n = int(input()) a = list(map(int, input().split())) a = [a[i] for i in range(n) if i % 2 == 0] a = np.array(a) ans = np.sum(a % 2 == 1) print(ans)
[["-", 0, 662, 12, 658, 0, 678, 0, 666, 0, 612], ["+", 0, 662, 12, 658, 0, 678, 0, 666, 0, 612]]
5
74
/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, PHP, Ruby, C#, VB, Perl, Swift, Prolog, Javascript, Pascal, HTML, CSS, JS Code, Compile, Run and Debug online from anywhere in world. **********...
/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, PHP, Ruby, C#, VB, Perl, Swift, Prolog, Javascript, Pascal, HTML, CSS, JS Code, Compile, Run and Debug online from anywhere in world. **********...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
79
#include <bits/stdc++.h> using namespace std; int main() { int N, ans = 0; cin >> N; for (int i = 0; i < N; i++) { int math; cin >> math; if (math % 2 == 1 && i % 2 == 1) { ans++; } } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int N, ans = 0; cin >> N; for (int i = 0; i < N; i++) { int math; cin >> math; if (math % 2 == 1 && (i + 1) % 2 == 1) { ans++; } } cout << ans << endl; }
[["+", 51, 16, 12, 16, 31, 16, 31, 23, 0, 24], ["+", 12, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 12, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 51, 16, 12, 16, 31, 16, 31, 23, 0, 25]]
1
71
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 1; i <= (n); i++) int main() { int n, cnt = 0; cin >> n; vector<int> a(n); rep(i, n) { cin >> a[i]; if ((i + 1) % 2 == 1 && a[i] % 2 == 1) { cnt++; } } cout << cnt << endl; }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) int main() { int n, cnt = 0; cin >> n; vector<int> a(n); rep(i, n) { cin >> a[i]; if ((i + 1) % 2 == 1 && a[i] % 2 == 1) { cnt++; } } cout << cnt << endl; }
[["-", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59]]
1
87
N=int(input()) a=tuple(map(int,input().split())) c=0 for i in range(N): if i%2 and a[i]%2:c+=1 print(c)
N=int(input()) a=tuple(map(int,input().split())) c=0 for i in range(1,N+1): if i%2 and a[i-1]%2:c+=1 print(c)
[["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612], ["+", 15, 679, 12, 657, 31, 206, 206, 657, 17, 33], ["+", 15, 679, 12, 657, 31, 206, 206, 657, 12, 612]]
5
55
package main import ( "fmt" ) func solve(nums []int) int { answer := 0 for i, n := range nums { if i%2 == 1 && n%2 == 1 { // Odd number answer++ } } return answer } func scanNums(len int) (nums []int) { var num int for i := 0; i < len; i++ { fmt.Scan(&num) nums = append(nums, num) } return ...
package main import ( "fmt" ) func solve(nums []int) int { answer := 0 for i, n := range nums { if (i+1)%2 == 1 && n%2 == 1 { // Odd number answer++ } } return answer } func scanNums(len int) (nums []int) { var num int for i := 0; i < len; i++ { fmt.Scan(&num) nums = append(nums, num) } ret...
[["+", 15, 16, 31, 16, 31, 16, 31, 23, 0, 24], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 12, 433], ["+", 15, 16, 31, 16, 31, 16, 31, 23, 0, 25]]
7
151
#include <bits/stdc++.h> using namespace std; int a[105]; int main() { int n; cin >> n; for (int i = 0; i < n; i++) { cin >> a[i]; } int count = 0; for (int j = 1; j < n; j += 2) { if (a[j] % 2 != 0) { count++; } } cout << count; }
#include <bits/stdc++.h> using namespace std; int a[105]; int main() { int n; cin >> n; for (int i = 1; i <= n; i++) { cin >> a[i]; } int count = 0; for (int j = 1; j <= n; j += 2) { if (a[j] % 2 != 0) { count++; } } cout << count; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
90
package main import ( "bufio" "fmt" "math" "os" "strconv" "strings" ) const ( BUFSIZE = 10000000 MOD = 1000000007 INF_INT = math.MaxInt32 INF_INT64 = math.MaxInt64 ) var rdr *bufio.Reader func main() { rdr = bufio.NewReaderSize(os.Stdin, BUFSIZE) solve() } func solve() { N := readint() A :=...
package main import ( "bufio" "fmt" "math" "os" "strconv" "strings" ) const ( BUFSIZE = 10000000 MOD = 1000000007 INF_INT = math.MaxInt32 INF_INT64 = math.MaxInt64 ) var rdr *bufio.Reader func main() { rdr = bufio.NewReaderSize(os.Stdin, BUFSIZE) solve() } func solve() { N := readint() A :=...
[["+", 15, 16, 31, 16, 31, 16, 31, 23, 0, 24], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 12, 433], ["+", 15, 16, 31, 16, 31, 16, 31, 23, 0, 25]]
7
1,092
#include <iostream> using namespace std; int main(void) { // Your code here! int a, k = 0; cin >> a; int b[a]; for (int i = 0; i < a; i++) cin >> b[i]; if (a % 2 == 0) { for (int i = 0; i < a / 2; i++) { if (b[i * 2 + 1] % 2 != 0) { k += 1; } } } else { for (int i = 0; ...
#include <iostream> using namespace std; int main(void) { // Your code here! int a, k = 0; cin >> a; int b[a]; for (int i = 0; i < a; i++) cin >> b[i]; if (a % 2 == 0) { for (int i = 0; i < a / 2; i++) { if (b[i * 2] % 2 != 0) { k += 1; } } } else { for (int i = 0; i < ...
[["-", 31, 16, 31, 69, 341, 342, 0, 16, 17, 72], ["-", 31, 16, 31, 69, 341, 342, 0, 16, 12, 13]]
1
149
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < n; i++) #define REP1(i, n) for (int i = 1; i < n + 1; i++) #define REPR(i, n) for (int i = n; i >= 0; i--) #define FOR(i, m, n) for (int i = m; i < n; i++) #define INF 2e9 #define ALL(v) v.begin(), v.end() #define SZ(x) ((int)(x).size()) #define ARRAY_LENGT...
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < n; i++) #define REP1(i, n) for (int i = 1; i < n + 1; i++) #define REPR(i, n) for (int i = n; i >= 0; i--) #define FOR(i, m, n) for (int i = m; i < n; i++) #define INF 2e9 #define ALL(v) v.begin(), v.end() #define SZ(x) ((int)(x).size()) #define ARRAY_LENGT...
[["+", 0, 43, 49, 50, 51, 4, 0, 16, 17, 72], ["+", 0, 43, 49, 50, 51, 4, 0, 16, 12, 13], ["-", 0, 14, 8, 9, 0, 14, 49, 53, 49, 22], ["+", 0, 14, 8, 9, 0, 14, 49, 53, 49, 22]]
1
238
n = int(input()) a = list(map(int,input().split())) count = 0 for i in range(len(a)): if i%2 ==1: if a[i]%2 ==1: count = count + 1 else: pass else: continue print(count)
n = int(input()) a = list(map(int,input().split())) count = 0 for i in range(len(a)): if (i+1)%2 ==1: if a[i]%2 ==1: count = count + 1 else: pass else: continue print(count)
[["+", 0, 57, 15, 666, 0, 657, 31, 23, 0, 24], ["+", 15, 666, 0, 657, 31, 23, 0, 657, 17, 72], ["+", 15, 666, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 0, 57, 15, 666, 0, 657, 31, 23, 0, 25]]
5
71
#include <algorithm> #include <iostream> #include <vector> #define llong long long #define rep(i, l, n) for (int(i) = (l); (i) < (n); (i++)) #define _min(a, b) ((a) < (b) ? (a) : (b)) using namespace std; int main() { int N; cin >> N; int a[N]; rep(i, 0, N) cin >> a[i]; int count = 0; rep(i, 0, N) { ...
#include <algorithm> #include <iostream> #include <vector> #define llong long long #define rep(i, l, n) for (int(i) = (l); (i) < (n); (i++)) #define _min(a, b) ((a) < (b) ? (a) : (b)) using namespace std; int main() { int N; cin >> N; int a[N]; rep(i, 0, N) cin >> a[i]; int count = 0; rep(i, 0, N) { ...
[["+", 0, 57, 15, 339, 51, 16, 31, 91, 17, 111]]
1
111
a=[input() for i in range(2)] a1=int(a[0]) a2=[int(i) for i in a[1].split()] count=0 for i in range(len(a2)): if i%2==1: if a2[i]%2==1: count+=1 print(count)
a=[input() for i in range(2)] a1=int(a[0]) a2=[int(i) for i in a[1].split()] count=0 for i in range(len(a2)): if (i+1)%2==1: if a2[i]%2==1: count+=1 print(count)
[["+", 0, 57, 15, 666, 0, 657, 31, 23, 0, 24], ["+", 15, 666, 0, 657, 31, 23, 0, 657, 17, 72], ["+", 15, 666, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 0, 57, 15, 666, 0, 657, 31, 23, 0, 25]]
5
80
#include <bits/stdc++.h> using namespace std; #define rep(i, N) for (int i = 0; i < (N); i++) int main() { int N; cin >> N; int ans = 0; rep(i, N) { int a; cin >> a; if (i % 2 && a % 2) ans++; } cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; #define rep(i, N) for (int i = 0; i < (N); i++) int main() { int N; cin >> N; int ans = 0; rep(i, N) { int a; cin >> a; if ((i + 1) % 2 && a % 2) ans++; } cout << ans << endl; return 0; }
[["+", 15, 339, 51, 16, 31, 16, 31, 23, 0, 24], ["+", 51, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 51, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 15, 339, 51, 16, 31, 16, 31, 23, 0, 25]]
1
69
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int count = 0; for (int i = 0; i < n; i++) { int a = sc.nextInt(); if (i % 2 == 1) { if (a % 2 == 1) count++; } } ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int count = 0; for (int i = 0; i < n; i++) { int a = sc.nextInt(); if ((i + 1) % 2 == 1) { if (a % 2 == 1) count++; } ...
[["+", 15, 15, 0, 16, 31, 16, 31, 23, 0, 24], ["+", 0, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 16, 31, 16, 31, 23, 0, 16, 12, 499], ["+", 15, 15, 0, 16, 31, 16, 31, 23, 0, 25]]
3
104
N = int(input()) a = list(map(int,input().split())) a.insert(0,0) counter = 0 for i in range(0,N,2): if a[i] % 2 == 1: counter += 1 print(counter)
N = int(input()) a = list(map(int,input().split())) a.insert(0,0) counter = 0 for i in range(1,N+1,2): if a[i] % 2 == 1: counter += 1 print(counter)
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
65
N = int(input()) l = [ int(x) for x in input().split()] def oddProblem(l): count = 0 for i in range(N): if (l[i] % 2 != 0 and i % 2 != 0): count += 1 return count print(oddProblem(l))
N = int(input()) l = [ int(x) for x in input().split()] def oddProblem(l): count = 0 for i in range(N): if (l[i] % 2 != 0 and (i+1) % 2 != 0): count += 1 return count print(oddProblem(l))
[["+", 0, 679, 12, 666, 0, 657, 31, 23, 0, 24], ["+", 12, 666, 0, 657, 31, 23, 0, 657, 17, 72], ["+", 12, 666, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 0, 679, 12, 666, 0, 657, 31, 23, 0, 25]]
5
73
import java.util.*; public class Main { public static void main(String[] args) { int N = scanner.nextInt(); int res = 0; for (int i = 0; i < N; i++) { int num = scanner.nextInt(); if (i % 2 != 0 && num % 2 != 0) { res++; } } System.out.println(res); } private stati...
import java.util.*; public class Main { public static void main(String[] args) { int N = scanner.nextInt(); int res = 0; for (int i = 1; i <= N; i++) { int num = scanner.nextInt(); if (i % 2 != 0 && num % 2 != 0) { res++; } } System.out.println(res); } private stat...
[["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19]]
3
105
#include <bits/stdc++.h> //g++-9で実行(gcc version 9.3.0),g++だとデフォルトのclang using namespace std; //#define int long long //intでオーバフローした時の切り替え用 #define OUT(x) std::cout << x << std::endl #define DEBUG(x) \ cerr << #x << ": " << x << endl //エラー出力として変数名と変数の中身表示...
#include <bits/stdc++.h> //g++-9で実行(gcc version 9.3.0),g++だとデフォルトのclang using namespace std; //#define int long long //intでオーバフローした時の切り替え用 #define OUT(x) std::cout << x << std::endl #define DEBUG(x) \ cerr << #x << ": " << x << endl //エラー出力として変数名と変数の中身表示...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
180
#include <iostream> using namespace std; const int N = 1e6; int q[N]; int main() { int n; cin >> n; int cnt = 0; for (int i = 0; i < n; i++) { scanf("%d", &q[i]); if (i % 2 == 1 && q[i] % 2 == 1) cnt++; } cout << cnt << endl; return 0; }
#include <iostream> using namespace std; const int N = 1e6 + 10; int q[N]; int main() { int n; cin >> n; int cnt = 0; for (int i = 1; i <= n; i++) { scanf("%d", &q[i]); if (i % 2 == 1 && q[i] % 2 == 1) cnt++; } cout << cnt << endl; return 0; }
[["+", 0, 30, 0, 43, 49, 50, 51, 16, 17, 72], ["+", 0, 30, 0, 43, 49, 50, 51, 16, 12, 13], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
94
a=int(input()) lst=list(map(int,input().split())) cnt=0 for i in range(0,a,2): if (lst[i] % 2==1) : cnt+=1 print(i) print(cnt)
a=int(input()) lst=list(map(int,input().split())) cnt=0 for i in range(0,a,2): if (lst[i] % 2==1) : cnt+=1 print(cnt)
[["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25], ["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24]]
5
63
n = int(input()) A = [int(i) for i in input().split()] ans = 0 for i in range(n): if i%2==1 and A[i]%2==1: ans += 1 else: continue print(ans)
n = int(input()) A = [int(i) for i in input().split()] ans = 0 for i in range(n): if (i+1)%2==1 and A[i]%2==1: ans += 1 else: continue print(ans)
[["+", 15, 679, 31, 666, 0, 657, 31, 23, 0, 24], ["+", 31, 666, 0, 657, 31, 23, 0, 657, 17, 72], ["+", 31, 666, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 15, 679, 31, 666, 0, 657, 31, 23, 0, 25]]
5
63
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int a[] = new int[N]; for (int i = 0; i < N; i++) { a[i] = sc.nextInt(); } int counter = 0; for (int i = 0; i < N; i++) { if (i % 2 == 1 ...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int a[] = new int[N]; for (int i = 0; i < N; i++) { a[i] = sc.nextInt(); } int counter = 0; for (int i = 0; i < N; i++) { if (i % 2 == 0 ...
[["-", 0, 57, 15, 15, 0, 16, 31, 16, 12, 499], ["+", 0, 57, 15, 15, 0, 16, 31, 16, 12, 499]]
3
132
#include <stdio.h> int main(void) { int i, n, k, c; scanf("%d", &n); c = 0; for (i = 1; i <= n; i++) { scanf("%d", &k); if (i % 2 == 1 || k % 2 == 1) { c++; } } printf("%d\n", c); }
#include <stdio.h> int main(void) { int i, n, k, c; scanf("%d", &n); c = 0; for (i = 1; i <= n; i++) { scanf("%d", &k); if (i % 2 == 1 && k % 2 == 1) { c++; } } printf("%d\n", c); }
[["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 106], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 98]]
0
86
n, *a = map(int, open(0).read().split()) ans = 0 for i in range(n): if i%2 and a[i]%2: ans += 1 print(ans)
n, *a = map(int, open(0).read().split()) ans = 0 for i in range(n): if i%2==0 and a[i]%2: ans += 1 print(ans)
[["+", 8, 196, 0, 57, 15, 679, 31, 666, 667, 60], ["+", 8, 196, 0, 57, 15, 679, 31, 666, 0, 612]]
5
52
N = int(input()) A = list(map(int, input().split())) ans = 0 for i in range(N): if i % 2 != 0 and A[i] % 2 != 0: ans += 1 print(ans)
N = int(input()) A = list(map(int, input().split())) ans = 0 for i in range(1,N+1): if i % 2 != 0 and A[i-1] % 2 != 0: ans += 1 print(ans)
[["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612], ["+", 12, 666, 0, 657, 31, 206, 206, 657, 17, 33], ["+", 12, 666, 0, 657, 31, 206, 206, 657, 12, 612]]
5
59
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int[] a = new int[N]; for (int i = 0; i < N; i++) { a[i] = sc.nextInt(); } int cnt = 0; for (int i = 0; i < N; i++) { if (i % ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int[] a = new int[N]; for (int i = 0; i < N; i++) { a[i] = sc.nextInt(); } int cnt = 0; for (int i = 0; i < N; i++) { if ((i +...
[["+", 0, 16, 31, 16, 31, 16, 31, 23, 0, 24], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 12, 499], ["+", 0, 16, 31, 16, 31, 16, 31, 23, 0, 25]]
3
134
#include <algorithm> #include <bits/stdc++.h> #include <set> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define T \ int t, q = 0; \ scanf(...
#include <algorithm> #include <bits/stdc++.h> #include <set> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define T \ int t, q = 0; \ scanf(...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
216
#include <bits/stdc++.h> using namespace std; #define ll long long int // map<pair<ll, ll>, ll> pos; vector<ll> Iraq; vector<ll> Seria; vector<ll> Afgan; vector<ll> temp; ll arrra[100008]; map<ll, ll> vis; map<ll, ll> tmp_vis; map<ll, ll> exact_pos; ll F[200009]; ll tF[200009]; vector<ll> sub_s[29]; vector<ll> siz; ll...
#include <bits/stdc++.h> using namespace std; #define ll long long int // map<pair<ll, ll>, ll> pos; vector<ll> Iraq; vector<ll> Seria; vector<ll> Afgan; vector<ll> temp; ll arrra[100008]; map<ll, ll> vis; map<ll, ll> tmp_vis; map<ll, ll> exact_pos; ll F[200009]; ll tF[200009]; vector<ll> sub_s[29]; vector<ll> siz; ll...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]]
1
193
input() a = list(map(int, input().split())) sum([ai % 2 for ai in a[::2]])
input() a = list(map(int, input().split())) print(sum([ai % 2 for ai in a[::2]]))
[["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
37
import java.util.*; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Scanner; class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); long N = scan.nextLong(); int co...
import java.util.*; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Scanner; class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); long N = scan.nextLong(); int co...
[["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19]]
3
144
n=int(input()) As = list(map(int,input().split())) c=0 ans = 0 for a in As: c+=1 if c%2 == 0: if a%2 == 1: ans+=1 print(ans)
n=int(input()) As = list(map(int,input().split())) c=0 ans = 0 for a in As: c+=1 if c%2 == 1: if a%2 == 1: ans+=1 print(ans)
[["-", 0, 7, 8, 196, 0, 57, 15, 666, 0, 612], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 0, 612]]
5
60
#include <bits/stdc++.h> #include <string> using namespace std; #include <chrono> #define gc getchar_unlocked #define fo(i, n) for (i = 0; i < n; i++) #define Fo(i, k, n) for (i = k; k < n ? i < n : i > n; k < n ? i += 1 : i -= 1) #define ll long long #define deb(x) cout << #x << "=" << x << endl #define deb2(x, y) cou...
#include <bits/stdc++.h> #include <string> using namespace std; #include <chrono> #define gc getchar_unlocked #define fo(i, n) for (i = 0; i < n; i++) #define Fo(i, k, n) for (i = k; k < n ? i < n : i > n; k < n ? i += 1 : i -= 1) #define ll long long #define deb(x) cout << #x << "=" << x << endl #define deb2(x, y) cou...
[["+", 51, 16, 31, 16, 31, 16, 31, 23, 0, 24], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 51, 16, 31, 16, 31, 16, 31, 23, 0, 25]]
1
766
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int c = 0; int arr[n]; for (int i = 0; i < n; i++) { cin >> arr[i]; if (i % 2 != 0 && arr[i] % 2 != 0) c++; } cout << c << "\n"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int c = 0; int arr[n + 1]; for (int i = 1; i <= n; i++) { cin >> arr[i]; if (i % 2 != 0 && arr[i] % 2 != 0) c++; } cout << c << "\n"; return 0; }
[["+", 8, 9, 0, 43, 49, 80, 81, 16, 17, 72], ["+", 8, 9, 0, 43, 49, 80, 81, 16, 12, 13], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
84
n = int(input()) a = list(map(int, input().split())) ans = 0 for i in range(1, n, 2): if a[i] % 2 == 1: ans += 1 print(ans)
n = int(input()) a = list(map(int, input().split())) ans = 0 for i in range(1, n+1, 2): if a[i-1] % 2 == 1: ans += 1 print(ans)
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612], ["+", 15, 666, 0, 657, 31, 206, 206, 657, 17, 33], ["+", 15, 666, 0, 657, 31, 206, 206, 657, 12, 612]]
5
57
def main(): N= int(input()) a = list(map(int,input().split())) cnt = 0 for i in range(1,N,2): if a[i] % 2 == 1: cnt += 1 print(cnt) if __name__ == '__main__': main()
def main(): N= int(input()) a = list(map(int,input().split())) cnt = 0 for i in range(0,N,2): if a[i] % 2 == 1: cnt += 1 print(cnt) if __name__ == '__main__': main()
[["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612]]
5
72
_,*a=map(int,open(0).read().split());print(sum(i%2for i in a[1::2]))
_,*a=map(int,open(0).read().split());print(sum(i%2for i in a[::2]))
[["-", 3, 668, 0, 659, 12, 206, 206, 663, 0, 612]]
5
42
N = int(input()) A = [int(x) for x in input().split()] count = 0 for i in range(len(A)): if i % 2 == 1 and A[i] % 2 == 1: count += 1 print(count)
N = int(input()) A = [int(x) for x in input().split()] count = 0 for i in range(1, len(A)+1): if i % 2 == 1 and A[i-1] % 2 == 1: count += 1 print(count)
[["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612], ["+", 12, 666, 0, 657, 31, 206, 206, 657, 17, 33], ["+", 12, 666, 0, 657, 31, 206, 206, 657, 12, 612]]
5
63
import numpy as np def main(N, a): ans = 0 for i in range(N): if i % 2 == 1 and a[i] % 2 == 1: ans += 1 return ans N = int(input()) a = list(map(int, input().split())) print(main(N, a))
import numpy as np def main(N, a): ans = 0 for i in range(N): if i % 2 == 0 and a[i] % 2 == 1: ans += 1 return ans N = int(input()) a = list(map(int, input().split())) print(main(N, a))
[["-", 8, 196, 0, 57, 15, 679, 31, 666, 0, 612], ["+", 8, 196, 0, 57, 15, 679, 31, 666, 0, 612]]
5
78
#include <bits/stdc++.h> using namespace std; int main() { int n, c = 0; cin >> n; int a[n]; for (int i = 0; i < n; i++) { cin >> a[i]; } for (int i = 0; i < n; i++) { if (i % 2 != 0) { if (a[i] % 2 != 0) { c++; } } } cout << c << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, c = 0; cin >> n; int a[n]; for (int i = 1; i <= n; i++) { cin >> a[i]; } for (int i = 1; i <= n; i++) { if (i % 2 != 0) { if (a[i] % 2 != 0) { c++; } } } cout << c << endl; return 0; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
103
import copy def main(): N = int(input()) l = list(map(int, input().split())) c = 0 for i in range(N): if (i + 1) % 2 == 0 and l[i] % 2 == 1: c = c + 1 print(c) main()
def main(): N = int(input()) l = list(map(int, input().split())) c = 0 for i in range(N): if (i + 1) % 2 == 1 and l[i] % 2 == 1: c = c + 1 print(c) main()
[["-", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["-", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22], ["-", 8, 196, 0, 57, 15, 679, 31, 666, 0, 612], ["+", 8, 196, 0, 57, 15, 679, 31, 666, 0, 612]]
5
75
#include <bits/stdc++.h> using namespace std; #define fRead(x) freopen(x, "r", stdin) #define fWrite(x) freopen(x, "w", stdout) #define LL long long #define ULL unsigned long long #define ff first #define ss second #define pb push_back #define PI acos(-1.0) #define mk make_pair #define pii pair<int, int> #define pll...
#include <bits/stdc++.h> using namespace std; #define fRead(x) freopen(x, "r", stdin) #define fWrite(x) freopen(x, "w", stdout) #define LL long long #define ULL unsigned long long #define ff first #define ss second #define pb push_back #define PI acos(-1.0) #define mk make_pair #define pii pair<int, int> #define pll...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
234
a = int(input()) n = list(map(int,input().split())) cnt = 1 ans = 0 for i in n: cnt = cnt +1 if cnt % 2 == 1 and i % 2 == 1 : ans = ans + 1 print (ans)
a = int(input()) n = list(map(int,input().split())) cnt = 0 ans = 0 for i in n: cnt = cnt +1 if cnt % 2 == 1 and i % 2 == 1 : ans = ans + 1 print (ans)
[["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612]]
5
63
#include <bits/stdc++.h> using namespace std; #define inf 1000000000 #define unvisited -1 #define visited 1 #define eps 1e-9 #define mp make_pair #define pb push_back #define pi acos(-1.0) #define uint64 unsigned long long #define FastSlowInput \ ios_base::syn...
#include <bits/stdc++.h> using namespace std; #define inf 1000000000 #define unvisited -1 #define visited 1 #define eps 1e-9 #define mp make_pair #define pb push_back #define pi acos(-1.0) #define uint64 unsigned long long #define FastSlowInput \ ios_base::syn...
[["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
167
N=int(input()) li = list(map(int,input().split())) coun=0 for i,h in enumerate(li): if i+1 % 2 == 1 and h % 2 == 1: coun+=1 print(coun)
N=int(input()) li = list(map(int,input().split())) coun=0 for i,h in enumerate(li): if ((i+1) % 2 == 1) and (h % 2 == 1): coun+=1 #print(i) print(coun)
[["+", 8, 196, 0, 57, 15, 679, 31, 23, 0, 24], ["+", 31, 23, 0, 666, 0, 657, 31, 23, 0, 24], ["+", 31, 23, 0, 666, 0, 657, 31, 23, 0, 25], ["+", 8, 196, 0, 57, 15, 679, 31, 23, 0, 25], ["+", 8, 196, 0, 57, 15, 679, 12, 23, 0, 24], ["+", 8, 196, 0, 57, 15, 679, 12, 23, 0, 25]]
5
60
#include <bits/stdc++.h> using namespace std; int n, a[101], sum = 0; int main() { cin >> n; for (int i = 0; i < n; ++i) { cin >> a[i]; if (i % 2 && a[i] % 2) sum++; } cout << sum; }
#include <bits/stdc++.h> using namespace std; int n, a[101], sum = 0; int main() { cin >> n; for (int i = 1; i <= n; ++i) { cin >> a[i]; if (i % 2 && a[i] % 2) sum++; } cout << sum; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
71
#include <bits/stdc++.h> #define test \ int t; \ cin >> t; \ while (t--) #define fast ...
#include <bits/stdc++.h> #define test \ int t; \ cin >> t; \ while (t--) #define fast ...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
80
#include <stdio.h> #define NUM 100 int main(void) { int i, a, b[NUM], e = 0; scanf("%d", &a); for (i = 0; i < a; i++) { scanf("%d", &b[i]); } for (i = 0; i < a; i++) { if (i % 2 != 0) { if (b[i] % 2 != 0) { e++; } } } printf("%d", e); return 0; }
#include <stdio.h> #define NUM 100 int main(void) { int i, a, b[NUM], e = 0; scanf("%d", &a); for (i = 0; i < a; i++) { scanf("%d", &b[i]); } for (i = 0; i < a; i++) { if (i % 2 == 0) { if (b[i] % 2 != 0) { e++; } } } printf("%d", e); return 0; }
[["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 79], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 60]]
0
117
n = gets.chomp.to_i a = gets.chomp.split(' ').map(&:to_i) arr = [] i = 1 while i <= n arr << [i,a[i-1]] i += 1 end # p arr # count c = 0 i = 0 while i < n if (a[i]%2 != 0) && (a[i][1]%2 !=0) c += 1 end i += 1 end puts c
n = gets.chomp.to_i a = gets.chomp.split(' ').map(&:to_i) arr = [] i = 1 while i <= n arr << [i,a[i-1]] i += 1 end # p arr # count c = 0 i = 0 while i < n if (arr[i][0]%2 != 0) && (arr[i][1]%2 !=0) # p "a[][]:#{a[i]}" c += 1 end i += 1 end puts c
[["-", 31, 739, 0, 738, 31, 738, 31, 742, 500, 22], ["+", 0, 738, 31, 738, 31, 742, 500, 742, 500, 22], ["+", 31, 739, 0, 738, 31, 738, 31, 742, 0, 70], ["+", 31, 739, 0, 738, 31, 738, 31, 742, 0, 612], ["+", 31, 739, 0, 738, 31, 738, 31, 742, 0, 73], ["-", 0, 738, 31, 738, 31, 742, 500, 742, 500, 22]]
4
99
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int d = 0, c = 0; for (int i = 0; i < n; i++) { cin >> d; if (i % 2 != 0 && d % 2 != 0) { c++; } } cout << c << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int d = 0, c = 0; for (int i = 1; i <= n; i++) { cin >> d; if (i % 2 != 0 && d % 2 != 0) { c++; } } cout << c << endl; return 0; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
76
N=int(input()) A=list(map(int,input().strip().split())) c=0 for i in range(1,N): if (i+1)%2!=0 and A[i]%2!=0: c+=1 print(c)
N=int(input()) A=list(map(int,input().strip().split())) c=0 for i in range(N): if (i+1)%2!=0 and A[i]%2!=0: c+=1 print(c)
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21]]
5
69
def main(): N = int(input()) a = list(map(int,input().split())) res = 0 for i in range(N): if i % 2 == 1 and a[i] % 2 == 1: res += 1 print(res) if __name__ == "__main__": main()
def main(): N = int(input()) a = list(map(int,input().split())) res = 0 for i in range(N): if (i+1) % 2 == 1 and a[i] % 2 == 1: res += 1 print(res) if __name__ == "__main__": main()
[["+", 15, 679, 31, 666, 0, 657, 31, 23, 0, 24], ["+", 31, 666, 0, 657, 31, 23, 0, 657, 17, 72], ["+", 31, 666, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 15, 679, 31, 666, 0, 657, 31, 23, 0, 25]]
5
74
#include <bits/stdc++.h> using namespace std; #define ll long long #define IOS \ std::ios::sync_with_stdio(false); \ cin.tie(NULL); \ cout.t...
#include <bits/stdc++.h> using namespace std; #define ll long long #define IOS \ std::ios::sync_with_stdio(false); \ cin.tie(NULL); \ cout.t...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
423
#include <bits/stdc++.h> #include <math.h> #include <string> #include <vector> using namespace std; int main() { int N; cin >> N; vector<int> a(N); int count = 0; for (int i = 0; i < N; i++) { cin >> a.at(i); if (i % 2 == 1) { if (a.at(i) % 2 == 1) { count++; } } } cout <<...
#include <bits/stdc++.h> #include <math.h> #include <string> #include <vector> using namespace std; int main() { int N; cin >> N; vector<int> a(N); int count = 0; for (int i = 0; i < N; i++) { cin >> a.at(i); if (i % 2 == 0) { if (a.at(i) % 2 == 1) { count++; } } } cout <<...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
98
#include <bits/stdc++.h> using namespace std; int main() { int n, cnt = 0; cin >> n; int a[n]; for (int i = 0; i < n; i++) { cin >> a[i]; if (i % 2 == 1 && a[i] % 2 == 1) cnt++; } cout << cnt; }
#include <bits/stdc++.h> using namespace std; int main() { int n, cnt = 0; cin >> n; int a[n + 5]; for (int i = 1; i <= n; i++) { cin >> a[i]; if (i % 2 == 1 && a[i] % 2 == 1) cnt++; } cout << cnt; }
[["+", 8, 9, 0, 43, 49, 80, 81, 16, 17, 72], ["+", 8, 9, 0, 43, 49, 80, 81, 16, 12, 13], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
76
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int N; cin >> N; vector<int> num(N); rep(i, N) cin >> num[i]; int count = 0; rep(i, N) { if (i % 2 != 0) { if (num[i] % 2 != 0) { count++; } } } cout << count ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int N; cin >> N; vector<int> num(N); rep(i, N) cin >> num[i]; int count = 0; rep(i, N) { if ((i + 1) % 2 != 0) { if (num[i] % 2 != 0) { count++; } } } cout << ...
[["+", 15, 339, 51, 16, 31, 16, 31, 23, 0, 24], ["+", 51, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 51, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 15, 339, 51, 16, 31, 16, 31, 23, 0, 25]]
1
95
N = int(input()) a = [int(i) for i in input().split()] ans = 0 for i in range(N): if i%2 != 0 and a[i]%2 != 0: ans += 1 print(ans)
N = int(input()) a = [int(i) for i in input().split()] ans = 0 for i in range(N): if i%2 == 0 and a[i]%2 != 0: ans += 1 print(ans)
[["-", 8, 196, 0, 57, 15, 679, 31, 666, 667, 79], ["+", 8, 196, 0, 57, 15, 679, 31, 666, 667, 60]]
5
60
#include <bits/stdc++.h> using namespace std; #define int long long int32_t main() { int n; cin >> n; int A[n]; int ct = 0; for (int i = 0; i < n; i++) { cin >> A[i]; if (i % 2 != 0 && A[i] % 2 != 0) ct++; } cout << ct; }
#include <bits/stdc++.h> using namespace std; #define int long long int32_t main() { int n; cin >> n; int A[n]; int ct = 0; for (int i = 0; i < n; i++) { cin >> A[i]; if ((i + 1) % 2 != 0 && A[i] % 2 != 0) ct++; } cout << ct; }
[["+", 51, 16, 31, 16, 31, 16, 31, 23, 0, 24], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 51, 16, 31, 16, 31, 16, 31, 23, 0, 25]]
1
80
#include <bits/stdc++.h> using namespace std; int main() { cin.tie(0); ios_base::sync_with_stdio(false); int n; cin >> n; vector<int> a(n); for (int i = 0; i < n; ++i) { cin >> a[i]; } int cnt = 0; for (int i = 0; i < n; ++i) { if ((i * a[i]) % 2 == 1) { cnt++; } } cout << cnt <...
#include <bits/stdc++.h> using namespace std; int main() { cin.tie(0); ios_base::sync_with_stdio(false); int n; cin >> n; vector<int> a(n); for (int i = 1; i <= n; ++i) { cin >> a[i]; } int cnt = 0; for (int i = 1; i < n + 1; ++i) { if ((i * a[i]) % 2 == 1) { cnt++; } } cout << ...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
115
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define REP(i, n) for (int i = 1; i <= n; i++) typedef long long ll; int main() { int n; cin >> n; vector<int> a(n + 1); rep(i, n) { cin >> a[i]; } int ans = 0; REP(i, n) { if (i % 2 == 1 && a[i] % 2 == 1) ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define REP(i, n) for (int i = 1; i <= n; i++) typedef long long ll; int main() { int n; cin >> n; vector<int> a(n + 1); REP(i, n) { cin >> a[i]; } int ans = 0; REP(i, n) { if (i % 2 == 1 && a[i] % 2 == 1) ...
[["-", 0, 14, 8, 9, 0, 14, 49, 53, 49, 22], ["+", 0, 14, 8, 9, 0, 14, 49, 53, 49, 22]]
1
108
#include <iostream> using namespace std; int main() { int N; cin >> N; int a[N], x = 0; for (int i = 0; i < N; i++) { cin >> a[i]; if (i % 2 == 1 && a[i] % 2 == 1) x++; } cout << x << endl; return 0; }
#include <iostream> using namespace std; int main() { int N; cin >> N; int a[N], x = 0; for (int i = 1; i <= N; i++) { cin >> a[i]; if (i % 2 == 1 && a[i] % 2 == 1) x++; } cout << x << endl; return 0; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
81
def ii():return int(input()) def iim():return map(int,input().split()) def iil():return list(map(int,input().split())) n = ii() A = iil() cnt = 0 for i,item in enumerate(A): if i%2==1 and item%2==1: cnt+=1 print(cnt)
def ii():return int(input()) def iim():return map(int,input().split()) def iil():return list(map(int,input().split())) n = ii() A = iil() cnt = 0 for i,item in enumerate(A): if (i+1)%2==1 and item%2==1: cnt+=1 print(cnt)
[["+", 15, 679, 31, 666, 0, 657, 31, 23, 0, 24], ["+", 31, 666, 0, 657, 31, 23, 0, 657, 17, 72], ["+", 31, 666, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 15, 679, 31, 666, 0, 657, 31, 23, 0, 25]]
5
94
n = int(input()) a = list(map(int, input().split())) count = 0 for i in range(n): if (i % 2 == 1 and a[i] % 2 == 1): count += 1 print(count)
n = int(input()) a = list(map(int, input().split())) count = 0 for i in range(n): if ((i + 1) % 2 == 1 and a[i] % 2 == 1): count += 1 print(count)
[["+", 0, 679, 31, 666, 0, 657, 31, 23, 0, 24], ["+", 31, 666, 0, 657, 31, 23, 0, 657, 17, 72], ["+", 31, 666, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 0, 679, 31, 666, 0, 657, 31, 23, 0, 25]]
5
61
N = int(input()) a = list(map(int, input().split())) cnt =0 for i in a[1::2]: if not i % 2 == 0: cnt = cnt +1 print(cnt)
N = int(input()) a = list(map(int, input().split())) cnt =0 for i in a[0::2]: if not i % 2 == 0: cnt = cnt +1 print(cnt)
[["-", 0, 656, 0, 7, 12, 206, 206, 663, 0, 612], ["+", 0, 656, 0, 7, 12, 206, 206, 663, 0, 612]]
5
56
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> a(N); int count = 0; for (int i = 0; i < N; i++) { cin >> a.at(i); if (a.at(i) % 2 != 0 && i % 2 != 0) count++; } cout << count << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> a(N); int count = 0; for (int i = 0; i < N; i++) { cin >> a.at(i); if (a.at(i) % 2 != 0 && (i + 1) % 2 != 0) count++; } cout << count << endl; }
[["+", 51, 16, 12, 16, 31, 16, 31, 23, 0, 24], ["+", 12, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 12, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 51, 16, 12, 16, 31, 16, 31, 23, 0, 25]]
1
86
#import numpy as np #import math #from decimal import * #from numba import njit #@njit def main(): N = int(input()) a = list(map(int, input().split())) count = 0 for i in range(N): if i%2 == 1 and a[i]%2 == 1: count += 1 print(count) main()
#import numpy as np #import math #from decimal import * #from numba import njit #@njit def main(): N = int(input()) a = list(map(int, input().split())) count = 0 for i in range(N): if (i+1)%2 == 1 and a[i]%2 == 1: count += 1 print(count) main()
[["+", 15, 679, 31, 666, 0, 657, 31, 23, 0, 24], ["+", 31, 666, 0, 657, 31, 23, 0, 657, 17, 72], ["+", 31, 666, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 15, 679, 31, 666, 0, 657, 31, 23, 0, 25]]
5
72
n = int(input()) a = list(map(int, input().split())) cnt = 0 for i in range(len(a)): if i % 2 and a[i] % 2: cnt += 1 print(cnt)
n = int(input()) a = list(map(int, input().split())) cnt = 0 for i in range(len(a)): if i % 2 == 0 and a[i] % 2: cnt += 1 print(cnt)
[["+", 8, 196, 0, 57, 15, 679, 31, 666, 667, 60], ["+", 8, 196, 0, 57, 15, 679, 31, 666, 0, 612]]
5
58
N = int(input()) a = [int(x) for x in input().split()] C=0 for i in range(N): if i%2!=0: if a[i]%2!=0: C+=1 print(C)
N = int(input()) a = [int(x) for x in input().split()] C=0 for i in range(1,N+1): if i%2!=0: if a[i-1]%2!=0: C+=1 print(C)
[["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612], ["+", 15, 666, 0, 657, 31, 206, 206, 657, 17, 33], ["+", 15, 666, 0, 657, 31, 206, 206, 657, 12, 612]]
5
61
#include <bits/stdc++.h> //#define DEBUG using namespace std; template <class T> void print_vect(std::vector<T> v) { for (int i = 0; i < v.size(); i++) cout << v[i] << " "; cout << endl; } void solve() { int N; cin >> N; int count = 0; int a; for (int i = 0; i < N; i++) { cin >> a; if (i %...
#include <bits/stdc++.h> //#define DEBUG using namespace std; template <class T> void print_vect(std::vector<T> v) { for (int i = 0; i < v.size(); i++) cout << v[i] << " "; cout << endl; } void solve() { int N; cin >> N; int count = 0; int a; for (int i = 0; i < N; i++) { cin >> a; if (i %...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
178
#include <bits/stdc++.h> using namespace std; int main() { int N; int count = 0; cin >> N; vector<int> A(N); A[0] = 0; for (int i = 1; i <= N; i++) { cin >> A[i]; } for (int i = 1; i <= N - 1; i++) { if (i % 2 == 1 && A[i] % 2 == 1) { count++; } } cout << count << endl; ret...
#include <bits/stdc++.h> using namespace std; int main() { int N; int count = 0; cin >> N; vector<int> A(N); A[0] = 0; for (int i = 1; i <= N; i++) { cin >> A[i]; } for (int i = 1; i <= N; i++) { if (i % 2 == 1 && A[i] % 2 == 1) { count++; } } cout << count << endl; return ...
[["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
112
import java.io.IOException; import java.util.ArrayList; import java.util.Scanner; public class Main { static int[][] map; static int[][] directions8 = {{-1, -1}, {-1, 0}, {-1, 1}, {0, -1}, {0, 1}, {1, -1}, {1, 0}, {1, 1}}; static int[][] directions4 = {{-1, 0}, {1, 0}, {0, -1}...
import java.io.IOException; import java.util.ArrayList; import java.util.Scanner; public class Main { static int[][] map; static int[][] directions8 = {{-1, -1}, {-1, 0}, {-1, 1}, {0, -1}, {0, 1}, {1, -1}, {1, 0}, {1, 1}}; static int[][] directions4 = {{-1, 0}, {1, 0}, {0, -1}...
[["+", 49, 200, 51, 227, 497, 505, 0, 16, 17, 72], ["+", 49, 200, 51, 227, 497, 505, 0, 16, 12, 499], ["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19]]
3
735
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define all(a) (a).begin(), (a).end() #define dunk(a) cout << (a) << endl using namespace std; typedef long long ll; int main() { int n; cin >> n; vector<int> a(n); rep(i, n) cin >> a[i]; int cnt = 0; for (int i = 0; i < n; i++) { ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define all(a) (a).begin(), (a).end() #define dunk(a) cout << (a) << endl using namespace std; typedef long long ll; int main() { int n; cin >> n; vector<int> a(n); rep(i, n) cin >> a[i]; int cnt = 0; for (int i = 0; i < n; i++) { ...
[["+", 51, 16, 31, 16, 31, 16, 31, 23, 0, 24], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 51, 16, 31, 16, 31, 16, 31, 23, 0, 25]]
1
116
N = input() a = list(map(int,input().split())) odd = a[1::2] count = 0 for i in odd: if i % 2 == 1: count += 1 else: pass print(count)
N = input() a = list(map(int,input().split())) odd = a[::2] count = 0 for i in odd: if i % 2 == 1: count += 1 else: pass print(count)
[["-", 0, 1, 0, 662, 12, 206, 206, 663, 0, 612]]
5
56
#include <bits/stdc++.h> using namespace std; typedef long long LL; LL arr[100005]; int main() { LL n; cin >> n; for (int i = 0; i < n; i++) cin >> arr[i]; LL cnt = 0; for (int i = 0; i < n; i++) { if (i % 2 && arr[i] % 2) cnt++; } cout << cnt; return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long LL; LL arr[100005]; int main() { LL n; cin >> n; for (int i = 1; i <= n; i++) cin >> arr[i]; LL cnt = 0; for (int i = 1; i <= n; i++) { if (i % 2 && arr[i] % 2) cnt++; } cout << cnt; return 0; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
95
<?php $n = trim(fgets(STDIN)); $a = explode(" ",trim(fgets(STDIN))); $ans = 0; foreach ($a as $key => $value) { if ($key % 2 !== 0 and $value % 2 !== 0) { ++$ans; } } echo $ans.PHP_EOL;
<?php $n = trim(fgets(STDIN)); $a = explode(" ",trim(fgets(STDIN))); $ans = 0; foreach ($a as $key => $value) { if ((1 + $key) % 2 !== 0 and $value % 2 !== 0) { ++$ans; } } echo $ans.PHP_EOL;
[["+", 0, 16, 31, 16, 31, 16, 31, 23, 0, 24], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 31, 612], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 16, 31, 16, 31, 16, 31, 23, 0, 25]]
6
76
#ifdef Rahul #include "RAHUL.h" #else #include <bits/stdc++.h> using namespace std; #define error(...) 42; #endif #define SZ(v) int((v).size()) #define ALL(vec) begin(vec), end(vec) typedef long long i64; template <typename T> inline bool uax(T &x, T y) { return (y > x) ? x = y, true : false; } template <typename T> ...
#ifdef Rahul #include "RAHUL.h" #else #include <bits/stdc++.h> using namespace std; #define error(...) 42; #endif #define SZ(v) int((v).size()) #define ALL(vec) begin(vec), end(vec) typedef long long i64; template <typename T> inline bool uax(T &x, T y) { return (y > x) ? x = y, true : false; } template <typename T> ...
[["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
232
n=int(input()) a = list(map(int,input().split())) count=0 for i in range(n): if i%2==1 and a[i]%2==1: count=count+1 print(count)
n=int(input()) a = list(map(int,input().split())) count=0 for i in range(n): if (i+1)%2==1 and a[i]%2==1: count=count+1 print(count)
[["+", 15, 679, 31, 666, 0, 657, 31, 23, 0, 24], ["+", 31, 666, 0, 657, 31, 23, 0, 657, 17, 72], ["+", 31, 666, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 15, 679, 31, 666, 0, 657, 31, 23, 0, 25]]
5
61
import java.util.*; public class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int[] a = new int[N]; int ans = 0; for (int i = 0; i < N; i++) { a[i] = sc.nextInt(); if (i % 2 == 1 && a[i] % 2 == 1) { ans++; } ...
import java.util.*; public class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int[] a = new int[N]; int ans = 0; for (int i = 0; i < N; i++) { a[i] = sc.nextInt(); if ((i + 1) % 2 == 1 && a[i] % 2 == 1) { ans++; ...
[["+", 0, 16, 31, 16, 31, 16, 31, 23, 0, 24], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 12, 499], ["+", 0, 16, 31, 16, 31, 16, 31, 23, 0, 25]]
3
118
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int ans = 0; for (int i = 0; i < n; i++) { int a = sc.nextInt(); if (a % 2 != 0 && i % 2 != 0) ans++; } System.out.println(ans); } ...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int ans = 0; for (int i = 1; i <= n; i++) { int a = sc.nextInt(); if (a % 2 != 0 && i % 2 != 0) ans++; } System.out.println(ans); }...
[["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19]]
3
100
N = int(input()) a = list(map(int, input().split())) #a = [list(map(int, list(input()))) for i in range(N + 1)] # L, R, d = map(int, input().split()) cnt = 0 for i in range(0, N, 2): print(i) if a[i] % 2 != 0: cnt += 1 print(cnt)
N = int(input()) a = list(map(int, input().split())) #a = [list(map(int, list(input()))) for i in range(N + 1)] # L, R, d = map(int, input().split()) cnt = 0 for i in range(0, N, 2): if a[i] % 2 != 0: cnt += 1 print(cnt)
[["-", 0, 7, 8, 196, 0, 1, 0, 652, 63, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25]]
5
63
N = int(input()) A = list(map(int, input().split())) count = 0 for i, a in enumerate(A): if i%2 and a%2: count += 1 print(count)
N = int(input()) A = list(map(int, input().split())) count = 0 for i, a in enumerate(A): if (i+1)%2 and a%2: count += 1 print(count)
[["+", 0, 57, 15, 679, 31, 657, 31, 23, 0, 24], ["+", 15, 679, 31, 657, 31, 23, 0, 657, 17, 72], ["+", 15, 679, 31, 657, 31, 23, 0, 657, 12, 612], ["+", 0, 57, 15, 679, 31, 657, 31, 23, 0, 25]]
5
54
n = int(input()) a = list(map(int,input().split())) odd = a[1::2] ans = 0 for i in range(len(odd)): if odd[i]%2 == 1: ans = ans + 1 print(ans)
n = int(input()) a = list(map(int,input().split())) odd = a[0::2] ans = 0 for i in range(len(odd)): if odd[i]%2 == 1: ans = ans + 1 print(ans)
[["-", 0, 1, 0, 662, 12, 206, 206, 663, 0, 612], ["+", 0, 1, 0, 662, 12, 206, 206, 663, 0, 612]]
5
67
# -*- coding: utf-8 -*- N = input() del N I1 = input().split() i = 0 for a in range(len(I1)): if (int(I1[a]) * a)%2 == 1: i += 1 print(i)
N = input() del N I1 = input().split(); i = 0 for a in range(len(I1)): if (int(I1[a]) * (a+1))%2 == 1: i += 1 print(i)
[["+", 36, 36, 36, 36, 36, 36, 0, 656, 0, 35], ["+", 0, 657, 31, 23, 0, 657, 12, 23, 0, 24], ["+", 31, 23, 0, 657, 12, 23, 0, 657, 17, 72], ["+", 31, 23, 0, 657, 12, 23, 0, 657, 12, 612], ["+", 0, 657, 31, 23, 0, 657, 12, 23, 0, 25]]
5
55
#include <bits/stdc++.h> using namespace std; using LL = long long; int main() { // freopen("in","r",stdin); std::ios::sync_with_stdio(false); std::cin.tie(nullptr); int n, r = 0; cin >> n; for (int i = 0, x; i < n; ++i) { cin >> x; if ((i & 1) && (x & 1)) ++r; } cout << r << endl; retu...
#include <bits/stdc++.h> using namespace std; using LL = long long; int main() { // freopen("in","r",stdin); std::ios::sync_with_stdio(false); std::cin.tie(nullptr); int n, r = 0; cin >> n; for (int i = 1, x; i <= n; ++i) { cin >> x; if ((i & 1) && (x & 1)) ++r; } cout << r << endl; ret...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
96
#include <bits/stdc++.h> using namespace std; // std::の省略のため using ll = long long; int main() { int n; cin >> n; vector<int> a(n); for (int i = 0; i < n; i++) cin >> a[i]; int count = 0; for (int i = 0; i < n; i++) { if (i % 2 != 0 && a[i] % 2 != 0) count++; } cout << count; retur...
#include <bits/stdc++.h> using namespace std; // std::の省略のため using ll = long long; int main() { int n; cin >> n; vector<int> a(n); for (int i = 0; i < n; i++) cin >> a[i]; int count = 0; for (int i = 0; i < n; i++) { if ((i + 1) % 2 != 0 && a[i] % 2 != 0) count++; } cout << count; ...
[["+", 51, 16, 31, 16, 31, 16, 31, 23, 0, 24], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 51, 16, 31, 16, 31, 16, 31, 23, 0, 25]]
1
104
#include <algorithm> #include <iostream> #include <string> #include <utility> #include <vector> typedef long long ll; int main() { int n; std::cin >> n; std::vector<int> a(n); for (int i = 0; i < n; i++) { std::cin >> a[i]; } int ans = 0; for (int i = 1; i < n; i += 2) { if (a[i] % 2 == 1) { ...
#include <algorithm> #include <iostream> #include <string> #include <utility> #include <vector> typedef long long ll; int main() { int n; std::cin >> n; std::vector<int> a(n); for (int i = 0; i < n; i++) { std::cin >> a[i]; } int ans = 0; for (int i = 0; i < n; i += 2) { if (a[i] % 2 == 1) { ...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
117
#include <bits/stdc++.h> using namespace std; using ll = long long; using Graph = vector<vector<int>>; #define rep(i, m, n) for (int(i) = (m); (i) < (n); ++(i)) #define rREP(i, m, n) for (int(i) = (n)-1; (i) >= (m); --(i)) #define all(x) (x).begin(), (x).end() #define out(y, x, h, w) (y) < 0 || (x) < 0 || (y) >= (h) ||...
#include <bits/stdc++.h> using namespace std; using ll = long long; using Graph = vector<vector<int>>; #define rep(i, m, n) for (int(i) = (m); (i) < (n); ++(i)) #define rREP(i, m, n) for (int(i) = (n)-1; (i) >= (m); --(i)) #define all(x) (x).begin(), (x).end() #define out(y, x, h, w) (y) < 0 || (x) < 0 || (y) >= (h) ||...
[["+", 15, 339, 51, 16, 31, 16, 31, 23, 0, 24], ["+", 51, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 51, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 15, 339, 51, 16, 31, 16, 31, 23, 0, 25]]
1
281
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <functional> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> #define REP(i, n) for (int i =...
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <functional> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> #define REP(i, n) for (int i =...
[["-", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["+", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["+", 51, 16, 12, 16, 31, 16, 31, 23, 0, 24], ["+", 12, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 12, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 51, 16, 12, 16, 31, 16, 31, 23, 0, 25]]
1
159
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int N; cin >> N; int res = 0; rep(i, N) { int a; cin >> a; if (i % 2 != 0 && a % 2 != 0) res++; } cout << res << endl; return 0; }
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int N; cin >> N; int res = 0; rep(i, N) { int a; cin >> a; if ((i + 1) % 2 != 0 && a % 2 != 0) res++; } cout << res << endl; return 0; }
[["+", 51, 16, 31, 16, 31, 16, 31, 23, 0, 24], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 51, 16, 31, 16, 31, 16, 31, 23, 0, 25]]
1
79
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) #define INF 1000000000000 using namespace std; using ll = long long; using ld = long double; using vs = vector<string>; int main() { ll n; ll ans = 0; cin >> n; vector<ll> a(n); rep(i, n) { cin >> a[i]; if ((a[i] % 2 != 0) && (i...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) #define INF 1000000000000 using namespace std; using ll = long long; using ld = long double; using vs = vector<string>; int main() { ll n; ll ans = 0; cin >> n; vector<ll> a(n); rep(i, n) { cin >> a[i]; if ((a[i] % 2 != 0) && ((...
[["+", 12, 23, 0, 16, 31, 16, 31, 23, 0, 24], ["+", 0, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 12, 23, 0, 16, 31, 16, 31, 23, 0, 25]]
1
110
#include <bits/stdc++.h> using namespace std; #define FOR(i, s, n) for (size_t i = (s); i < (size_t)(n); ++i) #define REP(i, n) FOR(i, 0, n) int main() { int n; cin >> n; auto a = vector<int>(n); for (auto &x : a) { cin >> x; } auto sum = 0; REP(i, a.size()) { if (i % 2 == 1 && a[i] % 2 == 1) {...
#include <bits/stdc++.h> using namespace std; #define FOR(i, s, n) for (size_t i = (s); i < (size_t)(n); ++i) #define REP(i, n) FOR(i, 0, n) int main() { int n; cin >> n; auto a = vector<int>(n); for (auto &x : a) { cin >> x; } auto sum = 0; REP(i, a.size()) { if (i % 2 == 0 && a[i] % 2 == 1) {...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
111
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <bitset> // bitset #include <cctype> // isupper, islower, isdigit, toupper, tolower #include <cstdint> // int64_t, int*_t #include <cstdio> // printf #include <deque> // deque #include <iostream> // cout, endl, cin ...
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <bitset> // bitset #include <cctype> // isupper, islower, isdigit, toupper, tolower #include <cstdint> // int64_t, int*_t #include <cstdio> // printf #include <deque> // deque #include <iostream> // cout, endl, cin ...
[["+", 15, 339, 51, 16, 31, 16, 31, 23, 0, 24], ["+", 51, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 51, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["+", 15, 339, 51, 16, 31, 16, 31, 23, 0, 25]]
1
159
n = int(input()) ls = list(map(int, input().split())) ans = 0 for i, ele in enumerate(ls): if i%2 != 0: if ele%2 != 0: ans += 1 print(ans)
n = int(input()) ls = list(map(int, input().split())) ans = 0 for i, ele in enumerate(ls): if (i+1)%2 != 0: if ele%2 != 0: ans += 1 print(ans)
[["+", 0, 57, 15, 666, 0, 657, 31, 23, 0, 24], ["+", 15, 666, 0, 657, 31, 23, 0, 657, 17, 72], ["+", 15, 666, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 0, 57, 15, 666, 0, 657, 31, 23, 0, 25]]
5
59