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 <iostream> #include <map> using namespace std; int main() { int x; map<int, int> rec; for (int i = 0; i < 5; ++i) { cin >> x; ++rec[x]; } for (int i = 1; i < 5; ++i) { if (!rec[i]) cout << i << endl; } return 0; }
#include <iostream> #include <map> using namespace std; int main() { int x; map<int, int> rec; for (int i = 0; i < 5; ++i) { cin >> x; ++rec[x]; } for (int i = 1; i < 6; ++i) { if (!rec[i]) cout << i << endl; } return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]]
1
84
A = Input() A = A.split() B = [] for x in A: y = int(x) B.append(y) c = [1, 2, 3, 4, 5] for x in range(len(B)): if B[x] != c[x]: z = x+1 print(z)
A = input() A = A.split() B = [] for x in A: y = int(x) B.append(y) c = [1, 2, 3, 4, 5] for x in range(len(B)): if B[x] != c[x]: z = x+1 print(z)
[["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22]]
5
77
#include <bits/stdc++.h> using namespace std; int main() { int x1, x2, x3, x4, x5; cin >> x1 >> x2 >> x3 >> x4 >> x5; if (x1 == 0) { cout << 1 << endl; } if (x2 == 0) { cout << 2 << endl; } if (x3 == 0) { cout << 4 << endl; } if (x4 == 0) { cout << 4 << endl; } if (x5 == 0) { ...
#include <bits/stdc++.h> using namespace std; int main() { int x1, x2, x3, x4, x5; cin >> x1 >> x2 >> x3 >> x4 >> x5; if (x1 == 0) { cout << 1 << endl; } if (x2 == 0) { cout << 2 << endl; } if (x3 == 0) { cout << 3 << endl; } if (x4 == 0) { cout << 4 << endl; } if (x5 == 0) { ...
[["-", 64, 9, 0, 1, 0, 16, 31, 16, 12, 13], ["+", 64, 9, 0, 1, 0, 16, 31, 16, 12, 13]]
1
105
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define BUFSIZE 1000000 int N, K; int hoge[BUFSIZE] = {0}; long long V, W, T; int count = 0; int main(void) { for (int i = 0; i < 5; i++) { scanf("%d", &hoge[i]); if (hoge[i] == 0) count = i; } printf("%d", count); }
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define BUFSIZE 1000000 int N, K; int hoge[BUFSIZE] = {0}; long long V, W, T; int count = 0; int main(void) { for (int i = 0; i < 5; i++) { scanf("%d", &hoge[i]); if (hoge[i] == 0) count = i + 1; } printf("%d", count); }
[["+", 0, 57, 64, 1, 0, 11, 12, 16, 17, 72], ["+", 0, 57, 64, 1, 0, 11, 12, 16, 12, 13]]
0
97
a , b ,c ,d ,e = map(int, input().strip().split()) list = [] list.append(a) list.append(b) list.append(c) list.append(d) list.append(e) count = 0 for i in range(0, len(list)-1): if list[i]==0: count = i+1 break print(count)
a , b ,c ,d ,e = map(int, input().strip().split()) list = [] list.append(a) list.append(b) list.append(c) list.append(d) list.append(e) count = 0 for i in range(0, len(list)): if list[i]==0: count = i+1 break print(count)
[["-", 0, 7, 12, 652, 3, 4, 0, 657, 17, 33], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
96
#include <cmath> #include <iostream> #include <string> using namespace std; int main() { int x[5], ans; for (int i = 0; i < 5; i++) { cin >> x[i]; } ans = x[0]; for (int i = 0; i < 5; i++) { if (x[i] == 0) { ans += i; } } cout << ans << endl; }
#include <cmath> #include <iostream> #include <string> using namespace std; int main() { int x[5], ans; for (int i = 0; i < 5; i++) { cin >> x[i]; } ans = 1; for (int i = 0; i < 5; i++) { if (x[i] == 0) { ans += i; } } cout << ans << endl; }
[["-", 8, 9, 0, 1, 0, 11, 12, 69, 28, 22], ["-", 0, 1, 0, 11, 12, 69, 341, 342, 0, 70], ["-", 0, 1, 0, 11, 12, 69, 341, 342, 0, 13], ["-", 0, 1, 0, 11, 12, 69, 341, 342, 0, 73], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13]]
1
91
x1, x2, x3, x4, x5 = map(int,input().split()) if x1 == 0: print("1") elif x2 == 0: print("2") elif x3 == 0: print("3") elif x3 == 0: print("4") else: print("5")
x1, x2, x3, x4, x5 = map(int,input().split()) if x1 == 0: print("1") elif x2 == 0: print("2") elif x3 == 0: print("3") elif x4 == 0: print("4") else: print("5")
[["-", 0, 656, 0, 57, 75, 665, 15, 666, 0, 22], ["+", 0, 656, 0, 57, 75, 665, 15, 666, 0, 22]]
5
74
vs = map(int,input().split()) for i in range(len(vs)): if vs[i] == 0: print(i)
vs = list(map(int,input().split())) for i in range(len(vs)): if vs[i] == 0: print(i+1)
[["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]]
5
37
A, B, C, D, E = map(int, input().split()) result = 15 - (A+B+C+D+E)
A, B, C, D, E = map(int, input().split()) result = 15 - (A+B+C+D+E) print(result)
[["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
37
x = list(map(int,input().split())) print(x.index("0")+1)
x = list(map(int,input().split())) print(x.index(0)+1)
[["-", 0, 657, 31, 652, 3, 4, 0, 557, 0, 654], ["-", 0, 657, 31, 652, 3, 4, 0, 557, 0, 655]]
5
30
#include <algorithm> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <vector> using namespace std; // マクロ&定数&関数 ===========...
#include <algorithm> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <vector> using namespace std; // マクロ&定数&関数 ===========...
[["-", 8, 9, 0, 7, 8, 9, 0, 37, 0, 38], ["-", 8, 9, 0, 7, 8, 9, 0, 37, 0, 13], ["-", 8, 9, 0, 7, 8, 9, 0, 37, 0, 35]]
1
2,210
#include <stdio.h> int main() { int x1, x2, x3, x4, x5; scanf("%d %d %d %d %d", x1, x2, x3, x4, x5); if (x1 == 0) { printf("1"); } else if (x2 == 0) { printf("2"); } else if (x3 == 0) { printf("3"); } else if (x4 == 0) { printf("4"); } else if (x5 == 0) { printf("5"); } return 0; }...
#include <stdio.h> int main() { int x1, x2, x3, x4, x5; scanf("%d %d %d %d %d", &x1, &x2, &x3, &x4, &x5); if (x1 == 0) { printf("1"); } else if (x2 == 0) { printf("2"); } else if (x3 == 0) { printf("3"); } else if (x4 == 0) { printf("4"); } else if (x5 == 0) { printf("5"); } return...
[["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67]]
0
118
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) int main() { vector<int> x(5); int answer; rep(i, 5) { cin >> x.at(i); if (x.at(i) == 0) { answer = x.at(i); } } cout << answer << endl; }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) int main() { vector<int> x(5); int answer; rep(i, 5) { cin >> x.at(i); if (x.at(i) == 0) { answer = i + 1; } } cout << answer << endl; }
[["-", 0, 1, 0, 11, 12, 2, 63, 118, 28, 22], ["-", 0, 1, 0, 11, 12, 2, 63, 118, 17, 131], ["-", 0, 1, 0, 11, 12, 2, 63, 118, 119, 120], ["-", 0, 1, 0, 11, 12, 2, 3, 4, 0, 24], ["-", 0, 1, 0, 11, 12, 2, 3, 4, 0, 25], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 12, 13]]
1
78
a = input() l = a.split() print(l) for i in range(5): if l[i]=='0': print(i+1)
a = input() l = a.split() for i in range(5): if l[i]=='0': print(i+1)
[["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
40
#include <iostream> using namespace std; int main() { int a[5]; for (int i = 0; i < 5; i++) cin >> a[i]; for (int j = 0; j < 5; j++) { if (a[j] == 0) cout << j; } }
#include <iostream> using namespace std; int main() { int a[5]; for (int i = 0; i < 5; i++) cin >> a[i]; for (int j = 0; j < 5; j++) { if (a[j] == 0) cout << j + 1; } }
[["+", 0, 57, 64, 1, 0, 16, 12, 16, 17, 72], ["+", 0, 57, 64, 1, 0, 16, 12, 16, 12, 13]]
1
68
li = list(map(int,input().split())) for i in range(5): if li[i]: print(i+1)
li = list(map(int,input().split())) for i in range(5): if li[i]==0: print(i+1)
[["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 60], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 0, 612]]
5
37
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <cctype> #include <chrono> #include <cmath> #include <cstdio> #include <deque> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #include <random> #include <set> ...
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <cctype> #include <chrono> #include <cmath> #include <cstdio> #include <deque> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #include <random> #include <set> ...
[["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]]
1
669
#include <algorithm> #include <iomanip> // input output manipulation #include <iostream> // input output stream, cin cout( console in console out) #include <stdio.h> // standard input output #include <string> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < (int)n; i++) #define ll long lo...
#include <algorithm> #include <iomanip> // input output manipulation #include <iostream> // input output stream, cin cout( console in console out) #include <stdio.h> // standard input output #include <string> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < (int)n; i++) #define ll long lo...
[["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]]
1
68
NumList = list(map(int,input().split())) isAssein = 0 for i in range(len(NumList)): if(i == 0): isAssein = (i + 1) print(isAssein)
NumList = list(map(int,input().split())) isAssein = 0 for i in range(len(NumList)): if(NumList[i] == 0): isAssein = (i + 1) print(str(isAssein))
[["+", 0, 57, 15, 23, 0, 666, 0, 206, 51, 22], ["+", 0, 57, 15, 23, 0, 666, 0, 206, 0, 70], ["+", 0, 57, 15, 23, 0, 666, 0, 206, 0, 73], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
49
#include <bits/stdc++.h> using namespace std; int main() { int x; for (int i = 0; i < 4; i++) { cin >> x; if (x == 0) { cout << i + 1 << endl; } } }
#include <bits/stdc++.h> using namespace std; int main() { int x; for (int i = 0; i < 5; i++) { cin >> x; if (x == 0) { cout << i + 1 << endl; } } }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]]
1
51
import sys n=list(map(int,input().split())) for i in range(0,4): if n[i]==0: print(i+1) sys.exit()
import sys n=list(map(int,input().split())) for i in range(0,5): if n[i]==0: print(i+1) sys.exit()
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]]
5
48
#include <bits/stdc++.h> #include <vector> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int a, b, c, d, e; cin >> a >> b >> c >> d >> e; vector<int> p; p.push_back(a); p.push_back(b); p.push_back(c); p.push_back(d);...
#include <bits/stdc++.h> #include <vector> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int a, b, c, d, e; cin >> a >> b >> c >> d >> e; vector<int> p; p.push_back(a); p.push_back(b); p.push_back(c); p.push_back(d);...
[["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]]
1
133
x = list(map(int, input().split())) print(x) for i in range(len(x)): if(x[i] == 0): print(i+1) exit()
x = list(map(int, input().split())) for i in range(len(x)): if(x[i] == 0): print(i+1) exit()
[["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
51
a = list(map(int, input().split())) answer = 0 for i in range(len(a)): if (a[i] == 0): answer = 0 break print(i)
a = list(map(int, input().split())) answer = 0 for i in range(len(a)): if (a[i] == 0): answer = 0 break print(i+1)
[["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]]
5
49
#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 a, b, c, d, e; cin >> a >> b >> c >> d >> e; if (a = 0) cout << 1; if (b = 0) cout << 2; if (c = 0) cout << 3; if (d = 0) cout << 4; if (e = 0) cout << ...
#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 a, b, c, d, e; cin >> a >> b >> c >> d >> e; if (a == 0) cout << 1; if (b == 0) cout << 2; if (c == 0) cout << 3; if (d == 0) cout << 4; if (e == 0) cou...
[["-", 8, 9, 0, 57, 15, 339, 51, 11, 17, 32], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60]]
1
99
#include <iostream> #include <string> using namespace std; int main() { string X[5]; int i; for (i = 0; i < 5; i++) { cin >> X[i]; if (X[i] == "0") break; } cout << i << "\n"; return 0; }
#include <iostream> #include <string> using namespace std; int main() { string X[5]; int i; for (i = 0; i < 5; i++) { cin >> X[i]; if (X[i] == "0") break; } cout << i + 1 << "\n"; return 0; }
[["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]]
1
69
/* include c++ libraries */ #include <algorithm> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <unordered_map> #include <vector> /* include c-lang libraries */ #include <climits> #include <cmath> /* include my libraries */ //#include <show_vec.hh> using namespace std; ...
/* include c++ libraries */ #include <algorithm> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <unordered_map> #include <vector> /* include c-lang libraries */ #include <climits> #include <cmath> /* include my libraries */ //#include <show_vec.hh> using namespace std; ...
[["+", 64, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 64, 1, 0, 16, 31, 16, 12, 16, 12, 13]]
1
120
a,b,c,d,e = map(int,input().split()) if a!=1: print(1) elif b!=2: print(2) elif b!=3: print(3) elif b!=4: print(4) elif b!=5: print(5)
a,b,c,d,e = map(int,input().split()) if a!=1: print(1) elif b!=2: print(2) elif c!=3: print(3) elif d!=4: print(4) elif e!=5: print(5)
[["-", 0, 656, 0, 57, 75, 665, 15, 666, 0, 22], ["+", 0, 656, 0, 57, 75, 665, 15, 666, 0, 22]]
5
67
#include <bits/stdc++.h> using namespace std; int main() { int arr[6]; int index; for (int i = 1; i < 6; i++) { scanf("%d", arr[i]); if (arr[i] == 0) index = i; } printf("%d", index); }
#include <bits/stdc++.h> using namespace std; int main() { int arr[6]; int index; for (int i = 0; i < 5; i++) { scanf("%d", &arr[i]); if (arr[i] == 0) index = i; } printf("%d", index + 1); }
[["-", 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, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
1
71
#include <algorithm> #include <deque> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unordered_map> #include <utility> #include <vector> int main() { int x[5]; bool used[6]; for (int i = 0;...
#include <algorithm> #include <deque> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unordered_map> #include <utility> #include <vector> int main() { int x[5]; bool used[6]; for (int i = 0;...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
145
import java.io.*; import java.util.*; public class Main { // taking inputs static BufferedReader s1; static BufferedWriter out; static String read() throws IOException { String line = ""; while (line.length() == 0) { line = s1.readLine(); continue; } return line; } static int in...
import java.io.*; import java.util.*; public class Main { // taking inputs static BufferedReader s1; static BufferedWriter out; static String read() throws IOException { String line = ""; while (line.length() == 0) { line = s1.readLine(); continue; } return line; } static int in...
[["+", 0, 1, 0, 492, 3, 4, 0, 16, 17, 72], ["+", 0, 492, 3, 4, 0, 16, 12, 5, 0, 62]]
3
441
#include <bits/stdc++.h> using namespace std; int main() { int n, j; for (int i = 0; i < n; i++) { cin >> n; if (n == 0) j = i + 1; } cout << j; }
#include <bits/stdc++.h> using namespace std; int main() { int n, j; for (int i = 0; i < 5; i++) { cin >> n; if (n == 0) j = i + 1; } cout << j; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]]
1
53
#include <bits/stdc++.h> using namespace std; typedef long long ll; //マクロ // forループ関係 //引数は、(ループ内変数,動く範囲)か(ループ内変数,始めの数,終わりの数)、のどちらか // Dがついてないものはループ変数は1ずつインクリメントされ、Dがついてるものはループ変数は1ずつデクリメントされる #define REP(i, n) for (ll i = 0; i < (ll)(n); i++) #define REPD(i, n) for (ll i = n - 1; i >= 0; i--) #define FOR(i, a, b) for...
#include <bits/stdc++.h> using namespace std; typedef long long ll; //マクロ // forループ関係 //引数は、(ループ内変数,動く範囲)か(ループ内変数,始めの数,終わりの数)、のどちらか // Dがついてないものはループ変数は1ずつインクリメントされ、Dがついてるものはループ変数は1ずつデクリメントされる #define REP(i, n) for (ll i = 0; i < (ll)(n); i++) #define REPD(i, n) for (ll i = n - 1; i >= 0; i--) #define FOR(i, a, b) for...
[["+", 8, 9, 0, 1, 0, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 1, 0, 16, 12, 16, 12, 13]]
1
166
#include <bits/stdc++.h> using namespace std; int main() { int ans; for (int i = 1; i <= 5; i++) { int a; cin >> a; if (a == 1) ans = i; } cout << ans; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int ans; for (int i = 1; i <= 5; i++) { int a; cin >> a; if (a == 0) ans = i; } cout << ans; return 0; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
55
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int x; for (int i = 1; i < 6; i++) { x = scan.nextInt(); if (x == 0) { System.out.println(x); break; } } } }
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int x; for (int i = 1; i < 6; i++) { x = scan.nextInt(); if (x == 0) { System.out.println(i); break; } } } }
[["-", 64, 196, 0, 1, 0, 492, 3, 4, 0, 22], ["+", 64, 196, 0, 1, 0, 492, 3, 4, 0, 22]]
3
81
#include <stdio.h> int main() { int x1, x2, x3, x4, x5; while (scanf("%d %d %d %d %d", &x1, &x2, &x3, &x4, &x5) == 0) ; if (x1 = 0) printf("1\n"); else if (x2 = 0) printf("2\n"); else if (x3 = 0) printf("3\n"); else if (x4 = 0) printf("4\n"); else if (x5 = 0) printf("5\n"); re...
#include <stdio.h> int main() { int x1, x2, x3, x4, x5; while (scanf("%d %d %d %d %d", &x1, &x2, &x3, &x4, &x5) == 0) ; if (x1 == 0) printf("1\n"); else if (x2 == 0) printf("2\n"); else if (x3 == 0) printf("3\n"); else if (x4 == 0) printf("4\n"); else if (x5 == 0) printf("5\n"); ...
[["-", 8, 9, 0, 57, 15, 23, 0, 11, 17, 32], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 60], ["-", 75, 76, 0, 57, 15, 23, 0, 11, 17, 32], ["+", 75, 76, 0, 57, 15, 23, 0, 16, 17, 60]]
0
123
a=input().split(" ") b=0 for i in range(0,4): b=b+1 if int(a[i])==0: print(b)
a=input().split(" ") b=0 for i in range(0,5): b=b+1 if int(a[i])==0: print(b)
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]]
5
45
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int a, b, c, d, e; cin >> a >> b >> c >> d >> e; if (a == 0) cout << 1 << endl; if (b == 0) cout << 1 << endl; if (c == 0) cout << 1 << en...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int a, b, c, d, e; cin >> a >> b >> c >> d >> e; if (a == 0) cout << 1 << endl; if (b == 0) cout << 2 << endl; if (c == 0) cout << 3 << en...
[["-", 0, 57, 64, 1, 0, 16, 31, 16, 12, 13], ["+", 0, 57, 64, 1, 0, 16, 31, 16, 12, 13]]
1
119
x = input().split() for i, a in enumerate(x): if(a == "0"): print(i)
x = input().split() for i, a in enumerate(x): if(a == "0"): print(i+1)
[["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]]
5
32
#A x = list(map(int, input().split())) print(x[x.index(0)] + 1)
#A x = list(map(int, input().split())) print(x.index(0) + 1)
[["-", 0, 652, 3, 4, 0, 657, 31, 206, 0, 70], ["-", 0, 657, 31, 206, 206, 652, 63, 319, 500, 22], ["-", 0, 652, 3, 4, 0, 657, 31, 206, 0, 73]]
5
32
#include <iostream> using namespace std; int main(void) { int A; int B; int C; int D; int E; cin >> A; cin >> B; cin >> C; cin >> D; cin >> E; if (A = 0) { cout << 1 << endl; } if (B = 0) { cout << 2 << endl; } if (C = 0) { cout << 3 << endl; } if (D = 0) { cout ...
#include <iostream> using namespace std; int main(void) { int A; int B; int C; int D; int E; cin >> A; cin >> B; cin >> C; cin >> D; cin >> E; if (A == 0) { cout << 1 << endl; } if (B == 0) { cout << 2 << endl; } if (C == 0) { cout << 3 << endl; } if (D == 0) { c...
[["-", 8, 9, 0, 57, 15, 339, 51, 11, 17, 32], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60]]
1
121
// date: 14/06/20 17:35:26 // #include <bits/stdc++.h> using namespace std; #define iterall(x) x.begin(), x.end() #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); typedef long long ll; typ...
// date: 14/06/20 17:35:26 // #include <bits/stdc++.h> using namespace std; #define iterall(x) x.begin(), x.end() #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); typedef long long ll; typ...
[["-", 8, 9, 0, 43, 49, 50, 51, 4, 0, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 4, 0, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]]
1
200
#include <stdio.h> int main(void) { int x[5]; int check = 0; for (int i = 0; i < 5; i++) { scanf("%d\n", &x[i]); if (x[i] == 0) check = i; } printf("%d\n", check); return 0; }
#include <stdio.h> int main(void) { int x[5]; int check = 0; for (int i = 0; i < 5; i++) { scanf("%d\n", &x[i]); if (x[i] == 0) check = i; } printf("%d\n", check + 1); return 0; }
[["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
0
76
#include <bits/stdc++.h> using namespace std; int main() { vector<int> data(5); for (int i = 0; i < 5; i++) { cin >> data.at(i); } for (int i = 0; i < 4; i++) { if (data.at(i) == (i + 1)) { continue; } else { cout << i + 1 << endl; break; } } }
#include <bits/stdc++.h> using namespace std; int main() { vector<int> data(5); for (int i = 0; i < 5; i++) { cin >> data.at(i); } for (int i = 0; i < 5; i++) { if (data.at(i) == (i + 1)) { continue; } else { cout << i + 1 << endl; break; } } }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]]
1
94
import numpy as np n = np.array(list(map(int, input().split()))) print(np.where(n == 0))
import numpy as np n = np.array(list(map(int, input().split()))) print(np.argmin(n)+1)
[["-", 0, 652, 3, 4, 0, 652, 63, 319, 319, 22], ["+", 3, 4, 0, 657, 31, 652, 63, 319, 319, 22], ["-", 3, 4, 0, 652, 3, 4, 0, 666, 667, 60], ["-", 3, 4, 0, 652, 3, 4, 0, 666, 0, 612], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]]
5
37
// Hiia #include <stdio.h> #include <stdlib.h> //rannsuu #include <time.h> // srand((unsigned int) time(0)); #include <math.h> //koudona keisann #include <string.h> //hairetsu //#define N // scanf("\n", ); // printf("\n", ); // long n,s; // scanf("%ld %ld", &n, &s); // for(i = 0; i < N; i++) { // long long a [100...
// Hiia #include <stdio.h> #include <stdlib.h> //rannsuu #include <time.h> // srand((unsigned int) time(0)); #include <math.h> //koudona keisann #include <string.h> //hairetsu //#define N // scanf("\n", ); // printf("\n", ); // long n,s; // scanf("%ld %ld", &n, &s); // for(i = 0; i < N; i++) { // long long a [100...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]]
0
112
if __name__ == '__main__': x = map(int, input().strip().split()) for num, i in enumerate(x): if i == 0: print(num) break
if __name__ == '__main__': x = map(int, input().strip().split()) for num, i in enumerate(x): if i == 0: print(num + 1) break
[["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]]
5
45
#include <stdio.h> int main() { int x[5], i; for (i = 0; i <= 4; i++) { scanf("%d", &x[i]); if (x[i] == 0) { printf("%d", i); return 0; } } }
#include <stdio.h> int main() { int x[5], i; for (i = 0; i <= 4; i++) { scanf("%d", &x[i]); if (x[i] == 0) { printf("%d", i + 1); return 0; } } }
[["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
0
67
#include <bits/stdc++.h> using namespace std; int main() { int x[5]; int ans = 0; for (int i = 0; i < 5; i++) { cin >> x[i]; if (x[i] == 0) ans = i; } cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int x[5]; int ans = 0; for (int i = 0; i < 5; i++) { cin >> x[i]; if (x[i] == 0) ans = ++i; } cout << ans << endl; return 0; }
[["+", 0, 57, 64, 1, 0, 11, 12, 27, 17, 29]]
1
68
#include <algorithm> #include <iostream> #include <string> #include <utility> #include <vector> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { vector<int> v(6, 0); rep(i, 5) { int tmp; cin >> tmp; v[tmp] = 1; } for (int i = 1; i < 5; i++...
#include <algorithm> #include <iostream> #include <string> #include <utility> #include <vector> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { vector<int> v(6, 0); rep(i, 5) { int tmp; cin >> tmp; v[tmp] = 1; } for (int i = 1; i <= 5; i+...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
106
variable = input().split() print(variable.index("0"))
variable = input().split() print(variable.index("0")+1)
[["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]]
5
20
data = list(map(int, input())) _sum = sum(data) print( 15-_sum )
data = list(map(int, input().split())) _sum = sum(data) print( 15-_sum )
[["+", 0, 652, 3, 4, 0, 652, 63, 319, 0, 131], ["+", 0, 652, 3, 4, 0, 652, 63, 319, 319, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
25
package main import( "bufio" f "fmt" "os" "strconv" ) var sc = bufio.NewScanner(os.Stdin) func scanInt() int { sc.Scan() a, err := strconv.Atoi(sc.Text()) if err != nil { f.Println(err) } return a } func scanSlice(n int) []int { a := make([]int, n) for i := 0; i < n; i++ { a[i] = scanInt() } return...
package main import( "bufio" f "fmt" "os" "strconv" ) var sc = bufio.NewScanner(os.Stdin) func scanInt() int { sc.Scan() a, err := strconv.Atoi(sc.Text()) if err != nil { f.Println(err) } return a } func scanSlice(n int) []int { a := make([]int, n) for i := 0; i < n; i++ { a[i] = scanInt() } return...
[["-", 36, 36, 0, 434, 0, 435, 8, 196, 0, 165], ["-", 8, 196, 0, 1, 0, 2, 63, 438, 439, 22], ["-", 8, 196, 0, 1, 0, 2, 63, 438, 0, 131], ["-", 8, 196, 0, 1, 0, 2, 63, 438, 119, 120], ["-", 8, 196, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 8, 196, 0, 1, 0, 2, 3, 4, 0, 22], ["-", 8, 196, 0, 1, 0, 2, 3, 4, 0, 25]]
7
191
nums = [int(s) for s in input().split(" ")] print(nums) for i in range(len(nums)): if nums[i] == 0: print(i + 1)
nums = [int(s) for s in input().split(" ")] for i in range(len(nums)): if nums[i] == 0: print(i + 1)
[["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
50
x = list(map(int,input().split())) for i in range(5): if x[i] == 0: print(i) exit()
x = list(map(int,input().split())) for i in range(5): if x[i] == 0: print(i+1) exit()
[["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]]
5
40
xs = gets.split.map(&:to_i) idx=0 xs.each_with_index do |x, i| if x == 0 idx = i + 1 break end end puts x
xs = gets.split.map(&:to_i) idx=0 xs.each_with_index do |x, i| if x == 0 idx = i + 1 break end end puts idx
[["-", 36, 36, 0, 493, 0, 652, 3, 4, 0, 22], ["+", 36, 36, 0, 493, 0, 652, 3, 4, 0, 22]]
4
37
#include <stdio.h> int main() { int x[5], i, k; for (i = 0; i < 5; i++) { scanf("%d", &x[i]); } for (i = 0; i < 5; i++) { if (x[i] == 0) { k = i; } } printf("%d", k); return 0; }
#include <stdio.h> int main() { int x[5], i, k; for (i = 0; i < 5; i++) { scanf("%d", &x[i]); } for (i = 0; i < 5; i++) { if (x[i] == 0) { k = i + 1; } } printf("%d", k); return 0; }
[["+", 64, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 12, 13]]
0
88
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned int uint; typedef unsigned long long ull; #define REP(i, n) for (ll(i) = 0; (i) < (n); (i)++) #define REPR(i, n) for (ll(i) = (n); (i) >= 0; (i)--) #define FOR(i, m, n) for (ll(i) = (m); (i) < (n); (i)++) #define INF 1e9 #define ALL(v)...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned int uint; typedef unsigned long long ull; #define REP(i, n) for (ll(i) = 0; (i) < (n); (i)++) #define REPR(i, n) for (ll(i) = (n); (i) >= 0; (i)--) #define FOR(i, m, n) for (ll(i) = (m); (i) < (n); (i)++) #define INF 1e9 #define ALL(v)...
[["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13]]
1
642
#include <algorithm> #include <bitset> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <utilit...
#include <algorithm> #include <bitset> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <utilit...
[["+", 64, 9, 0, 1, 0, 16, 12, 16, 17, 72], ["+", 64, 9, 0, 1, 0, 16, 12, 16, 12, 13]]
1
148
#include <stdio.h> int main(void) { int a[5], i; for (i = 0; i < 5; i++) { scanf("%d", &a[i]); } for (i = 0; i < 5; i++) { if (a[i] == 0) { printf("%d", i); break; } } return 0; }
#include <stdio.h> int main(void) { int a[5], i; for (i = 0; i < 5; i++) { scanf("%d", &a[i]); } for (i = 0; i < 5; i++) { if (a[i] == 0) { printf("%d", i + 1); break; } } return 0; }
[["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
0
85
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { int arr[6]; for (int i = 1; i < 6; ++i) cin >> arr[i]; for (int i = 1; i < 6; ++i) { if (arr[i] == 0) cout << i; break; } }
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { int arr[6]; for (int i = 1; i < 6; ++i) cin >> arr[i]; for (int i = 1; i < 6; ++i) { if (arr[i] == 0) { cout << i; break; } } }
[["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46]]
1
73
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> ii; typedef vector<int> vi; typedef vector<ii> vii; typedef vector<vi> vvi; typedef vector<vii> vvii; #define fi first #define se second #define ALL(x) (x).begin(), (x).end() #define RALL(x) (x).rbegin(), (x).rend() #define pf pu...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> ii; typedef vector<int> vi; typedef vector<ii> vii; typedef vector<vi> vvi; typedef vector<vii> vvii; #define fi first #define se second #define ALL(x) (x).begin(), (x).end() #define RALL(x) (x).rbegin(), (x).rend() #define pf pu...
[["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13]]
1
553
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll a[5], i, n; ll m = 1; ll ret; cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4]; for (i = 0; i < 5; i++) { if (a[i] != i) { cout << i << endl; return 0; } } return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll a[5], i, n; ll m = 1; ll ret; cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4]; for (i = 0; i < 5; i++) { if (a[i] != i + 1) { cout << i + 1 << endl; return 0; } } return 0; }
[["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 72], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]]
1
100
#include <bits/stdc++.h> using namespace std; int main() { int i = 1; int selectedVal = 1; int temp; while (i < 5) { cin >> temp; if (temp == 0) selectedVal = i; i++; } cout << selectedVal << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int i = 1; int selectedVal = 1; int temp; while (i <= 5) { cin >> temp; if (temp == 0) selectedVal = i; i++; } cout << selectedVal << endl; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19]]
1
56
#include <iostream> #include <vector> using namespace std; int main() { int in; vector<int> v; int s(0), save; int i = 0; while (i < 5) { cin >> in; s++; v.push_back(in); if (in == 0) { save = s; } } cout << save << "\n"; return 0; }
#include <iostream> #include <vector> using namespace std; int main() { int in; vector<int> v; int s(0), save; int i = 0; while (i < 5) { cin >> in; s++; v.push_back(in); if (in == 0) { save = s; } i++; } cout << save << "\n"; return 0; }
[["+", 0, 52, 8, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 27, 17, 29], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]]
1
81
#include <iostream> using namespace std; int main() { int x[5]; for (int i = 0; i < 5; i++) { cin >> x[i]; } for (int i = 0; i < 5; i++) { if (x[i] == 0) cout << i + 1; return 0; } }
#include <iostream> using namespace std; int main() { int x[5]; for (int i = 0; i < 5; i++) { cin >> x[i]; } for (int i = 0; i < 5; i++) { if (x[i] == 0) { cout << i + 1; return 0; } } }
[["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46]]
1
75
x = list(map(int, input().split())) c=0 for i in x: c =c+1 if i == 0: ans = c else: ans -0 print(ans)
x = list(map(int, input().split())) c=0 for i in x: c =c+1 if i == 0: ans = c print(ans)
[["-", 0, 7, 8, 196, 0, 57, 75, 76, 0, 95], ["-", 0, 7, 8, 196, 0, 57, 75, 76, 0, 102], ["-", 75, 76, 8, 196, 0, 1, 0, 657, 31, 22], ["-", 75, 76, 8, 196, 0, 1, 0, 657, 17, 33], ["-", 75, 76, 8, 196, 0, 1, 0, 657, 12, 612]]
5
47
a = [int(i) for i in input().split()] for i in range(0,a.len()): if a[i]==0: print(i+1)
a = [int(i) for i in input().split()] for i in range(0,len(a)): if a[i]==0: print(i+1)
[["-", 12, 652, 3, 4, 0, 652, 63, 319, 500, 22], ["-", 12, 652, 3, 4, 0, 652, 63, 319, 0, 131], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 22]]
5
46
import sys from math import factorial from collections import Counter from fractions import Fraction import heapq, bisect, fractions import math import itertools sys.setrecursionlimit(10 ** 5 + 10) INF = 10**15 +5 def input(): return sys.stdin.readline().strip() def INT(): return int(input()) def MAP(): return map(int,...
import sys from math import factorial from collections import Counter from fractions import Fraction import heapq, bisect, fractions import math import itertools sys.setrecursionlimit(10 ** 5 + 10) INF = 10**15 +5 def input(): return sys.stdin.readline().strip() def INT(): return int(input()) def MAP(): return map(int,...
[["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]]
5
146
// #include <bits/stdc++.h> #include <algorithm> #include <cmath> #include <cstring> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; #define ll long long #d...
// #include <bits/stdc++.h> #include <algorithm> #include <cmath> #include <cstring> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; #define ll long long #d...
[["+", 8, 9, 0, 57, 64, 37, 0, 16, 17, 72], ["+", 8, 9, 0, 57, 64, 37, 0, 16, 12, 13]]
1
118
#include <bits/stdc++.h> using namespace std; int main() { vector<int> x(5); for (int i = 0; i < 5; i++) { cin >> x.at(i); } for (int i = 0; i < 5; i++) { if (x.at(i) == 0) { cout << i << endl; break; } } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { vector<int> x(5); for (int i = 0; i < 5; i++) { cin >> x.at(i); } for (int i = 0; i < 5; i++) { if (x.at(i) == 0) { cout << i + 1 << endl; break; } } return 0; }
[["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]]
1
86
// I am so vegetable //#define err #pragma GCC optimize(2) #include <bits/stdc++.h> #define FIO ios::sync_with_stdio(false), cin.tie(0), cout.tie(0) #define PB push_back #define IN insert #define ER erase #define CT count #define EP empty #define _for(i, a, b) for (int i = (a); i < (b); ++i) #define _rfor(i, a, b) for ...
// I am so vegetable //#define err #pragma GCC optimize(2) #include <bits/stdc++.h> #define FIO ios::sync_with_stdio(false), cin.tie(0), cout.tie(0) #define PB push_back #define IN insert #define ER erase #define CT count #define EP empty #define _for(i, a, b) for (int i = (a); i < (b); ++i) #define _rfor(i, a, b) for ...
[["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13]]
1
423
#include <bits/stdc++.h> using namespace std; int main() { vector<int> vec(5); for (int i = 0; i < 5; i++) { cin >> vec.at(i); } int answer = 0; for (int i = 0; i < 4; i++) { if (vec.at(i) == 0) { answer = i + 1; break; } } cout << answer << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { vector<int> vec(5); for (int i = 0; i < 5; i++) { cin >> vec.at(i); } int answer = 0; for (int i = 0; i < 5; i++) { if (vec.at(i) == 0) { answer = i + 1; break; } } cout << answer << endl; return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]]
1
97
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { vector<int> a(5); for (int i = 0; i <= 4; i++) { cin >> a.at(i); } for (int i = 0; i <= 4; i++) { if (a.at(i) == 0) cout << i << endl; } }
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { vector<int> a(5); for (int i = 0; i <= 4; i++) { cin >> a.at(i); } for (int i = 0; i <= 4; i++) { if (a.at(i) == 0) cout << i + 1 << endl; } }
[["+", 64, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 64, 1, 0, 16, 31, 16, 12, 16, 12, 13]]
1
83
a=list(map(int,input().split(" "))) for j in range(1,6): if(a[j]!=j): print(j) break
a=list(map(int,input().split(" "))) for j in range(1,6): if(a[j-1]!=j): print(j) break
[["+", 15, 23, 0, 666, 0, 206, 206, 657, 17, 33], ["+", 15, 23, 0, 666, 0, 206, 206, 657, 12, 612]]
5
45
#include <iostream> using namespace std; int main(int argc, char *argv[]) { int x[5], i; for (i = 0; i < 4; i++) { cin >> x[i]; if (x[i] == 0) { cout << i + 1 << endl; return 0; } } return 0; }
#include <iostream> using namespace std; int main(int argc, char *argv[]) { int x[5], i; for (i = 0; i < 5; i++) { cin >> x[i]; if (x[i] == 0) { cout << i + 1 << endl; return 0; } } return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]]
1
75
#include <bits/stdc++.h> #define mod 1000000007 #define pb push_back #define ff first #define ss second #define ll long long int using namespace std; int main() { int a[5]; for (int i = 0; i < 4; i++) { cin >> a[i]; if (a[i] == 0) cout << i + 1 << "\n"; } return 0; }
#include <bits/stdc++.h> #define mod 1000000007 #define pb push_back #define ff first #define ss second #define ll long long int using namespace std; int main() { ll a[6]; for (int i = 1; i < 6; i++) { cin >> a[i]; if (a[i] == 0) cout << i << "\n"; } return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 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, 12, 13], ["+", 0, 14, 8, 9, 0,...
1
78
x=input.split() for i in range(5): if x[i]=='0': print(str(i+1))
x=input().split() for i in range(5): if x[i]=='0': print(str(i+1))
[["+", 12, 652, 63, 319, 500, 652, 3, 4, 0, 24], ["+", 12, 652, 63, 319, 500, 652, 3, 4, 0, 25]]
5
34
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define ALL(obj) (obj).begin, (obj).end() int main() { vector<int> x(5); cin >> x[0] >> x[1] >> x[2] >> x[3] >> x[4]; for (int i = 0; i < 4; i++) { if (x[i] == 0) { cout << i + 1 << endl; return 0; } } }
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define ALL(obj) (obj).begin(), (obj).end() int main() { vector<int> x(5); cin >> x[0] >> x[1] >> x[2] >> x[3] >> x[4]; for (int i = 0; i < 5; i++) { if (x[i] == 0) { cout << i + 1 << endl; return 0; } } }
[["-", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]]
1
97
#include <iostream> using namespace std; int main() { int x; for (int i = 0; i < 4; i++) { cin >> x; if (x == 0) { cout << i + 1; } } return 0; }
#include <iostream> using namespace std; int main() { int x; for (int i = 0; i < 5; i++) { cin >> x; if (x == 0) { cout << i + 1; } } return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]]
1
52
x = list(map(int,input().split())) for i in range(5): if i == 0: print(i+1)
x = list(map(int,input().split())) for i in range(5): if x[i] == 0: print(i+1)
[["+", 8, 196, 0, 57, 15, 666, 0, 206, 51, 22], ["+", 8, 196, 0, 57, 15, 666, 0, 206, 0, 70], ["+", 8, 196, 0, 57, 15, 666, 0, 206, 0, 73]]
5
36
#include <bits/stdc++.h> using namespace std; int main() { int t = 4; int ans; for (int i = 0; i < t; i++) { cin >> ans; if (ans == 0) { cout << i + 1 << endl; break; } } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int t = 5; int ans; for (int i = 0; i < t; i++) { cin >> ans; if (ans == 0) { cout << i + 1 << endl; break; } } return 0; }
[["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]]
1
61
#include <bits/stdc++.h> using namespace std; int main(void) { int x[5]; cin >> x[0] >> x[1] >> x[2] >> x[3] >> x[4]; for (int i = 0; i < 5; i++) { if (x[i] == 0) { cout << i << endl; break; } } }
#include <bits/stdc++.h> using namespace std; int main(void) { int x[5]; cin >> x[0] >> x[1] >> x[2] >> x[3] >> x[4]; for (int i = 0; i < 5; i++) { if (x[i] == 0) { cout << i + 1 << endl; break; } } }
[["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]]
1
81
a,b,c,d,e= list(map(int,input().split())) if a ==0: print(1) elif b ==0: print(2) elif c ==0: print(3) elif d == 4: print(4) else: print(5)
a,b,c,d,e= list(map(int,input().split())) if a ==0: print(1) elif b ==0: print(2) elif c ==0: print(3) elif d == 0: print(4) else: print(5)
[["-", 0, 656, 0, 57, 75, 665, 15, 666, 0, 612], ["+", 0, 656, 0, 57, 75, 665, 15, 666, 0, 612]]
5
67
#include <bits/stdc++.h> using namespace std; int main() { vector<int> x(5); int a = 0; for (int i = 0; i < 5; i++) { cin >> x.at(i); if (x.at(i) == 0) { a = 1; break; } } cout << a << endl; }
#include <bits/stdc++.h> using namespace std; int main() { vector<int> x(5); int a = 0; for (int i = 0; i < 5; i++) { cin >> x.at(i); if (x.at(i) == 0) { a = i + 1; break; } } cout << a << endl; }
[["+", 64, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 17, 72]]
1
76
// to be build tomorrow #include <bits/stdc++.h> #define ll long long using namespace std; int main() { ll t = 1; while (t--) { ll x1, x2, x3, x4, x5; cin >> x1 >> x2 >> x3 >> x4 >> x5; ll p = 0; if (!x1) p = 1; if (!x2) p = 2; if (!x3) p = 3; if (!x4) p = 4; ...
// to be build tomorrow #include <bits/stdc++.h> #define ll long long using namespace std; int main() { ll t = 1; while (t--) { ll x1, x2, x3, x4, x5; cin >> x1 >> x2 >> x3 >> x4 >> x5; ll p = 0; if (!x1) p = 1; else if (!x2) p = 2; else if (!x3) p = 3; else if (!x4) ...
[["+", 0, 52, 8, 9, 0, 57, 75, 76, 0, 95], ["+", 0, 57, 75, 76, 0, 57, 75, 76, 0, 95]]
1
104
#include <bits/stdc++.h> using namespace std; #define endl '\n' int main() { ios::sync_with_stdio(false); cin.tie(NULL); int a; for (int i = 0; i < 5; i++) { cin >> a; if (a == 0) cout << i; } }
#include <bits/stdc++.h> using namespace std; #define endl '\n' int main() { ios::sync_with_stdio(false); cin.tie(NULL); int a; for (int i = 0; i < 5; i++) { cin >> a; if (a == 0) cout << i + 1; } }
[["+", 0, 57, 64, 1, 0, 16, 12, 16, 17, 72], ["+", 0, 57, 64, 1, 0, 16, 12, 16, 12, 13]]
1
62
#include "bits/stdc++.h" using namespace std; int main() { vector<int> x(5); int c = 1; for (int i = 0; i < 4; i++) { cin >> x[i]; if (x[i] == 0) { cout << c; } c++; } }
#include "bits/stdc++.h" using namespace std; int main() { vector<int> x(5); int c = 1; for (int i = 0; i < 5; i++) { cin >> x[i]; if (x[i] == 0) { cout << c; } c++; } }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]]
1
69
x = list(input()) s=(x.index("0")) print(int(s)+1)
x = list(input().split()) s=(x.index("0")) print(int(s)+1)
[["+", 12, 652, 3, 4, 0, 652, 63, 319, 0, 131], ["+", 12, 652, 3, 4, 0, 652, 63, 319, 319, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]]
5
29
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int a; rep(i, 4) { cin >> a; if (a == 0) { cout << i + 1 << endl; return 0; } } return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int a; rep(i, 5) { cin >> a; if (a == 0) { cout << i + 1 << endl; return 0; } } return 0; }
[["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13]]
1
74
#include <bits/stdc++.h> using namespace std; int main() { for (int i = 0; i < 5; i++) { int x_i; cin >> x_i; if (x_i == 0) { cout << i << endl; } } }
#include <bits/stdc++.h> using namespace std; int main() { for (int i = 0; i < 5; i++) { int x_i; cin >> x_i; if (x_i == 0) { cout << i + 1 << endl; } } }
[["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]]
1
49
#include <stdio.h> int main() { int a[5]; int i; int n; for (i = 0; i < 5; i++) { scanf("%d ", &a[i]); if (a[i] == 0) n = i; } printf("%d", n); }
#include <stdio.h> int main() { int a[5]; int i; int n; for (i = 0; i < 5; i++) { scanf("%d ", &a[i]); if (a[i] == 0) n = i; } printf("%d", n + 1); }
[["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
0
70
a=input().split(' ') m=len(a) b=0 while b<m: if a[b]=='0': print(b) b=b+1
a=input().split(' ') m=len(a) b=0 while b<m: if a[b]=='0': print(b+1) b=b+1
[["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]]
5
45
/* 実行時間1s制限の場合10^6 1,000,000 : 余裕をもって間に合う10^7 10,000,000 : おそらく間に合う10^8 100,000,000 : 非常にシンプルな処理 でないと厳しい */ #define rep(i, n) for (int i = 0; i < (int)n; i++) #define repi(i, a, b) for (int i = int(a); i < int(b); ++i) #include <bits/stdc++.h> #define M_PI 3.14159265358979323846 using namespace std; typedef long...
/* 実行時間1s制限の場合10^6 1,000,000 : 余裕をもって間に合う10^7 10,000,000 : おそらく間に合う10^8 100,000,000 : 非常にシンプルな処理 でないと厳しい */ #define rep(i, n) for (int i = 0; i < (int)n; i++) #define repi(i, a, b) for (int i = int(a); i < int(b); ++i) #include <bits/stdc++.h> #define M_PI 3.14159265358979323846 using namespace std; typedef long...
[["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
768
#pragma warning(disable : 4996) #pragma comment(linker, "/STACK:336777216") #pragma GCC optimize("Ofast") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <functional> using namespace std; using namespace __gnu_pbds; typedef long long ll; #define int lon...
#pragma warning(disable : 4996) #pragma comment(linker, "/STACK:336777216") #pragma GCC optimize("Ofast") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <functional> using namespace std; using namespace __gnu_pbds; typedef long long ll; #define int lon...
[["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13]]
1
480
import java.util.Scanner; public class Main { private static final int MOD = 1_000_000_007; private static final String YES = "Yes"; private static final String NO = "No"; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x1 = sc.nextInt(); int x2 = sc.nextInt(); ...
import java.util.Scanner; public class Main { private static final int MOD = 1_000_000_007; private static final String YES = "Yes"; private static final String NO = "No"; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x1 = sc.nextInt(); int x2 = sc.nextInt(); ...
[["-", 8, 196, 0, 57, 15, 15, 0, 16, 31, 22], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 31, 22]]
3
189
#include <algorithm> #include <iostream> #include <set> #include <vector> using ll = long long; #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; int main() { rep(i, 5) { int a; cin >> a; if (a == 0) cout << i << endl; } return 0; }
#include <algorithm> #include <iostream> #include <set> #include <vector> using ll = long long; #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; int main() { rep(i, 5) { int a; cin >> a; if (a == 0) cout << i + 1 << endl; } return 0; }
[["+", 64, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 64, 1, 0, 16, 31, 16, 12, 16, 12, 13]]
1
62
#include <bits/stdc++.h> using namespace std; int main() { int A, B, C, D, E; cin >> A >> B >> C >> D >> E; if (A == 0) { cout << A << endl; } else if (B == 0) { cout << B << endl; } else if (C == 0) { cout << C << endl; } else if (D == 0) { cout << D << endl; } else if (E ==...
#include <bits/stdc++.h> using namespace std; int main() { int A, B, C, D, E; cin >> A >> B >> C >> D >> E; if (A == 0) { cout << 1 << endl; } else if (B == 0) { cout << 2 << endl; } else if (C == 0) { cout << 3 << endl; } else if (D == 0) { cout << 4 << endl; } else if (E ==...
[["-", 64, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 64, 9, 0, 1, 0, 16, 31, 16, 12, 13]]
1
109
lst = [int(i) for i in input().split()] for i in range(lst): if lst[i] == 0: ans = i+1 print(ans)
lst = [int(i) for i in input().split()] for i in range(len(lst)): if lst[i] == 0: ans = i+1 print(ans)
[["+", 0, 7, 12, 652, 3, 4, 0, 652, 63, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
43
#include <bits/stdc++.h> using namespace std; #define int long long #define double long double #define fo(a, b) for (int a = 0; a < b; a++) #define Sort(a) sort(a.begin(), a.end()) #define rev(a) reverse(a.begin(), a.end()) #define fi first #define se second #define sz size() #define bgn begin() #define en end() #defin...
#include <bits/stdc++.h> using namespace std; #define int long long #define double long double #define fo(a, b) for (int a = 0; a < b; a++) #define Sort(a) sort(a.begin(), a.end()) #define rev(a) reverse(a.begin(), a.end()) #define fi first #define se second #define sz size() #define bgn begin() #define en end() #defin...
[["-", 0, 9, 0, 57, 15, 339, 51, 11, 17, 32], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 17, 60]]
1
3,063