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 <algorithm> #include <cstdio> using namespace std; int main() { // freopen("test.txt", "r", stdin); int num, cas = 1; while (~scanf("%d", &num)) { printf("Case %d: %d\n", cas++, num); } return 0; }
#include <algorithm> #include <cstdio> using namespace std; int main() { // freopen("test.txt", "r", stdin); int num, cas = 1; while (~scanf("%d", &num) && num) { printf("Case %d: %d\n", cas++, num); } return 0; }
[["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 12, 22]]
1
53
#include <iostream> #include <utility> using namespace std; int main() { int x; int i = 1; while (1) { cin >> x; if (x == 0) { break; } cout << "Case " << i << ": " << x; i = i + 1; } return 0; }
#include <iostream> #include <utility> using namespace std; int main() { int x; int i = 1; while (1) { cin >> x; if (x == 0) { break; } cout << "Case " << i << ": " << x << endl; i = i + 1; } return 0; }
[["+", 0, 52, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22]]
1
65
#include <iostream> #include <string> using namespace std; int main() { int i = 1; int x; while (true) { cin >> x; if (x == 0) break; cout << "Case " << i << ": " << x << endl; } return 0; }
#include <iostream> #include <string> using namespace std; int main() { int i = 1; int x; while (true) { cin >> x; if (x == 0) break; cout << "Case " << i << ": " << x << endl; i++; } 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
59
#include <iostream> #include <vector> using namespace std; int main(int argc, char *argv[]) { int input, count; vector<int> inputs; while (input != 0) { cin >> input; if (input != 0) inputs.push_back(input); count++; } count = 1; for (auto value : inputs) { cout << "Case " << count ...
#include <iostream> #include <vector> using namespace std; int main(int argc, char *argv[]) { int input, count; vector<int> inputs; input = 1; while (input != 0) { cin >> input; if (input != 0) { inputs.push_back(input); count++; } } count = 1; for (auto value : inputs) { c...
[["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 52, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 52, 8, 9, 0, 57, 64, 9, 0, 46]]
1
93
//#define _USE_MATH_DEFINES #define _CRT_SECURE_NO_WARNINGS //#include <cstdio> //#include <cstdlib> //#include <cmath> #include <algorithm> #include <cstring> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; int main(void) { ...
//#define _USE_MATH_DEFINES #define _CRT_SECURE_NO_WARNINGS //#include <cstdio> //#include <cstdlib> //#include <cmath> #include <algorithm> #include <cstring> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; int main(void) { ...
[["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 17, 151], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 64, 1, 0, 16, 31, 16, 31, 16, 17, 151], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["+"...
1
82
#include <iostream> using namespace std; int main() { int i = 0, n; while (cin >> n && n) cout << "Case " << ++i << ': ' << n << endl; }
#include <iostream> using namespace std; int main() { int i = 0, n; while (cin >> n && n) cout << "Case " << ++i << ": " << n << endl; }
[["-", 0, 16, 31, 16, 31, 16, 12, 103, 0, 104], ["-", 0, 16, 31, 16, 31, 16, 12, 103, 0, 125], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
44
#include <iostream> using namespace std; int main(void) { int i, x; i = 0; while (1) { cin >> x; if (x == 0) break; cout << "Case " << i << ": " << x << endl; i++; } }
#include <iostream> using namespace std; int main(void) { int i, x; i = 1; while (1) { cin >> x; if (x == 0) break; cout << "Case " << i << ": " << x << endl; i++; } return 0; }
[["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 35]]
1
59
#include <iostream> using namespace std; int main() { for (int i = 0, x = 0;; i++) { cin >> x; if (x == 0) break; cout << "Case " << i << ": " << x << endl; } return 0; }
#include <iostream> using namespace std; int main() { for (int i = 1, x = 0;; i++) { cin >> x; if (x == 0) break; cout << "Case " << i << ": " << x << endl; } return 0; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
60
#include <iostream> using namespace std; int main() { int x; cin >> x; ; for (int i = 1; x != 0; i++) { cout << "case " << i << ": " << x << endl; cin >> x; } return 0; }
#include <iostream> using namespace std; int main() { int x; cin >> x; ; for (int i = 1; x != 0; i++) { cout << "Case " << i << ": " << x << endl; cin >> x; } return 0; }
[["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
59
#include <iostream> using namespace std; int main() { int x; int i = 1; while (1) { cin >> x; if (x == 0) break; cout << "Case " << i << ":" << x << endl; i++; } }
#include <iostream> using namespace std; int main() { int x; int i = 1; while (1) { cin >> x; if (x == 0) break; cout << "Case " << i << ": " << x << endl; i++; } }
[["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
57
#include <stdio.h> int main() { int i, x, j = 1; while (1) { scanf("%d", &x); if (x == 0) break; printf("Case %d: %d", j, x); j++; } return 0; }
#include <stdio.h> int main() { int i, x, j = 1; while (1) { scanf("%d", &x); if (x == 0) break; printf("Case %d: %d\n", j, x); j++; } return 0; }
[["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
1
58
#include <stdio.h> int main() { int i = 0, n; while (1) { i++; scanf("%d", &n); if (n == 0) break; printf("Case %d:%d\n", i, n); } return 0; }
#include <stdio.h> int main() { int i = 0, n; while (1) { i++; scanf("%d", &n); if (n == 0) break; printf("Case %d: %d\n", i, n); } return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
57
#include <iostream> using namespace std; int main() { int i = 1; int x; for (;;) { cin >> x; if (x == 0) break; cout << "case" << " " << i << ":" << " " << x << endl; ++i; } return 0; }
#include <iostream> using namespace std; int main() { int i = 1; int x; for (;;) { cin >> x; if (x == 0) break; cout << "Case" << " " << i << ":" << " " << x << endl; ++i; } return 0; }
[["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
69
#include <iostream> using namespace std; int main() { int x, y; y = 0; while (1) { cin >> x; if (x == 0) break; y = y + 1; cout << "Case" << " " << y << ":" << x << endl; } }
#include <iostream> using namespace std; int main() { int x, y; y = 0; while (1) { cin >> x; if (x == 0) break; y = y + 1; cout << "Case" << " " << y << ":" << " " << x << endl; } }
[["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151]]
1
65
#include <iostream> using namespace std; int main() { int x, i; cin >> x; i = 0; while (1) { cin >> x; if (x == 0) break; i++; cout << "Case" << " " << i << ":" << " " << x << endl; } }
#include <iostream> using namespace std; int main() { int x, i; i = 0; while (1) { cin >> x; if (x == 0) break; i++; cout << "Case" << " " << i << ":" << " " << x << endl; } }
[["-", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
70
#include <iostream> using namespace std; int main() { int x; int counter = 0; while (1) { cin >> x; if (x == 0) break; counter++; // counter = counter +1; // counter +=1; cout << "case " << counter << ": " << x << endl; } return 0; }
#include <iostream> using namespace std; int main() { int x; int counter = 0; while (1) { cin >> x; if (x == 0) break; counter++; // counter = counter +1; // counter +=1; cout << "Case " << counter << ": " << x << endl; } return 0; }
[["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
62
#include <stdio.h> int main() { int x[25556], cnt = 0; while (1) { cnt++; scanf("%d", &x[cnt]); if (x[cnt] == 0) break; } cnt = 0; while (1) { cnt++; if (x[cnt] == 0) break; else printf("Case %d:%d\n", cnt, x[cnt]); } }
#include <stdio.h> int main() { int x[25556], cnt = 0; while (1) { cnt++; scanf("%d", &x[cnt]); if (x[cnt] == 0) break; } cnt = 0; while (1) { cnt++; if (x[cnt] == 0) break; else printf("Case %d: %d\n", cnt, x[cnt]); } }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
91
#include <iostream> using namespace std; int main(int argc, char *argv[]) { long long i = 0; while (true) { int x; cin >> x; if (x == 0) break; cout << "Case " << i << ": " << x << endl; i++; } return 0; }
#include <iostream> using namespace std; int main(int argc, char *argv[]) { int i = 1; while (true) { int x; cin >> x; if (x == 0) break; cout << "Case " << i << ": " << x << endl; i++; } return 0; }
[["-", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]]
1
69
#include <iostream> using namespace std; int main() { int i, a; i = 0; cin >> a; while (a) { i++; cout << "Case:" << i << " " << a << endl; cin >> a; }; return 0; }
#include <iostream> using namespace std; int main() { int i, a; i = 0; cin >> a; while (a) { i++; cout << "Case " << i << ": " << a << endl; cin >> a; }; return 0; }
[["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
58
#include <stdio.h> int main(void) { int x, i; for (int i = 1;; i++) { scanf("%d", &x); if (x == 0) break; printf("Case %d: %d\n", x, i); } return 0; }
#include <stdio.h> int main(void) { int x, i; for (int i = 1;; i++) { scanf("%d", &x); if (x == 0) break; printf("Case %d: %d\n", i, x); } return 0; }
[["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]]
1
60
#include <iostream> using namespace std; int main() { int i = 0, x; while (true) { cin >> x; if (x == 0) break; cout << "Case " << i << ": " << x << endl; i++; } return 0; }
#include <iostream> using namespace std; int main() { int i = 1, x; while (true) { cin >> x; if (x == 0) break; cout << "Case " << i << ": " << x << endl; i++; } return 0; }
[["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]]
1
59
#include <iostream> using namespace std; int main() { int x; int i = 0; while (1) { i++; cin >> x; if (!x) break; cout << "Case " << i << ":" << x << endl; } return 0; }
#include <iostream> using namespace std; int main() { int x; int i = 0; while (1) { i++; cin >> x; if (!x) break; cout << "Case " << i << ": " << x << endl; } return 0; }
[["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
59
#include <iostream> using namespace std; int main() { int n, i = 1; while (true) { cin >> n; if (n != 0) { cout << "case " << i << ": " << n << endl; i++; } else { break; } } return 0; }
#include <iostream> using namespace std; int main() { int n, i = 1; while (true) { cin >> n; if (n != 0) { cout << "Case " << i << ": " << n << endl; i++; } else { break; } } return 0; }
[["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
64
#include <iostream> int main() { int i = 1, x; while (true) { std::cin >> x; if (x == 0) { break; } std::cout << "case " << i << ": " << x << "\n"; i++; } return 0; }
#include <iostream> int main() { int i = 1, x; while (true) { std::cin >> x; if (x == 0) { break; } std::cout << "Case " << i << ": " << x << "\n"; i++; } return 0; }
[["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
63
#include <iostream> using namespace std; int main() { int str[10000], i; str[1] = 1; for (int i = 1; i < i + 1; i++) { cin >> str[i]; if (str[i] == 0) { for (int a = 1; a <= i; a++) { cout << "Case " << a << ": " << str[a] << endl; } break; } } return 0; }
#include <iostream> using namespace std; int main() { int str[10000], i; str[1] = 1; for (int i = 1; i < i + 1; i++) { cin >> str[i]; if (str[i] == 0) { for (int a = 1; a < i; a++) { cout << "Case " << a << ": " << str[a] << endl; } break; } } return 0; }
[["-", 0, 57, 64, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 57, 64, 9, 0, 7, 15, 16, 17, 18]]
1
103
#include <iostream> using namespace std; int main() { int x, i; for (i = 0; i++;) { cin >> x; if (x == 0) { break; } cout << "Case" << i << ":" << x << endl; } return 0; }
#include <iostream> using namespace std; int main() { int x, i; for (i = 1;; i++) { cin >> x; if (x == 0) { break; } cout << "Case " << i << ": " << x << endl; } return 0; }
[["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 7, 0, 35], ["-", 0, 30, 0, 14, 8, 9, 0, 7, 0, 35], ["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31,...
1
62
#include <iostream> using namespace std; int main() { int i = 1, x; for (;;) { cin >> x; if (x == 0) break; cout << "Case " << i << ": " << x << endl; } return 0; }
#include <iostream> using namespace std; int main() { int i = 1, x; for (;;) { cin >> x; if (x == 0) break; cout << "Case " << i << ": " << x << endl; i++; } return 0; }
[["+", 0, 7, 8, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 7, 8, 9, 0, 1, 0, 27, 17, 29], ["+", 8, 9, 0, 7, 8, 9, 0, 1, 0, 35]]
1
57
#include <iostream> using namespace std; int main(void) { int x = -1; int cnt = 1; while (true) { cin >> x; if (x == 0) { break; } cout << "Case" << cnt << ": " << x << endl; cnt++; } return 0; }
#include <iostream> using namespace std; int main(void) { int x = -1; int cnt = 1; while (true) { cin >> x; if (x == 0) { break; } cout << "Case " << cnt << ": " << x << endl; cnt++; } return 0; }
[["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
65
#include <iostream> int main() { int i = 0, x = 1; while (x == 0) { std::cin >> x; if (x != 0) { i++; std::cout << "Case " << i << ": " << x << std::endl; } } return 0; }
#include <iostream> int main() { int i = 0, x = 1; while (x != 0) { std::cin >> x; if (x != 0) { i++; std::cout << "Case " << i << ": " << x << std::endl; } } return 0; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 79]]
1
65
#include <iostream> using namespace std; int main() { int a = 2; while (1) { int x; cin >> x; if (x == 0) break; cout << "Case " << a << ": " << x << endl; a += 2; } return 0; }
#include <iostream> using namespace std; int main() { int a = 1; while (1) { int x; cin >> x; if (x == 0) break; cout << "Case " << a << ": " << x << endl; a++; } return 0; }
[["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 0, 52, 8, 9, 0, 1, 0, 11, 17, 107], ["-", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 52, 8, 9, 0, 1, 0, 27, 17, 29]]
1
61
#include <iostream> using namespace std; int main(int argc, char **argv) { int x = 0; int i = 1; while (cin >> x) { cout << "Case " << i << ": " << x << endl; i++; } return 0; }
#include <iostream> using namespace std; int main(int argc, char **argv) { int x = 0; int i = 1; while (cin >> x, x) { cout << "Case " << i << ": " << x << endl; i++; } return 0; }
[["+", 8, 9, 0, 52, 15, 339, 51, 34, 0, 21], ["+", 8, 9, 0, 52, 15, 339, 51, 34, 12, 22]]
1
59
#include <iostream> using namespace std; int main() { int c = 0; while (1) { int p; cin >> p; if (p == 0) break; c++; cout << "Cace " << c << ": " << p << endl; } }
#include <iostream> using namespace std; int main() { int c = 0; while (1) { int p; cin >> p; if (p == 0) break; c++; cout << "Case " << c << ": " << p << endl; } }
[["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
57
#include <iostream> using namespace std; int x; int main() { for (int i = 0; i < 10000; i++) { cin >> x; if (x == 0) { break; } cout << "Case " << i << ":" << " " << x << endl; } }
#include <iostream> using namespace std; int x; int main() { for (int i = 1; i < 10001; i++) { cin >> x; if (x == 0) { break; } cout << "Case " << i << ":" << " " << 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, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]]
1
65
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <vector> using namespace std; int coun = 0, z; int main() { while (1) { cin >> z; if (!z) return 0; cout << "case " << ++coun << ": ...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <vector> using namespace std; int coun = 0, z; int main() { while (1) { cin >> z; if (!z) return 0; cout << "Case " << ++coun << ": ...
[["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
72
#include <stdio.h> int main() { int x, i; for (i = 1; i <= 10000; i++) { scanf("%d", &x); if (x == 0) { break; } printf("case %d: %d\n", i, x); } }
#include <stdio.h> int main() { int x, i; for (i = 1; i <= 10000; i++) { scanf("%d", &x); if (x == 0) { break; } printf("Case %d: %d\n", i, x); } }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
60
#include <iostream> using namespace std; int main() { for (int i = 1;; ++i) { int x; cin >> x; if (x == 0) break; cout << "Case " << i << ": " << x; } return 0; }
#include <iostream> using namespace std; int main() { for (int i = 1;; ++i) { int x; cin >> x; if (x == 0) break; cout << "Case " << i << ": " << x << endl; } return 0; }
[["+", 0, 7, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 7, 8, 9, 0, 1, 0, 16, 12, 22]]
1
57
#include <stdio.h> int main() { int x, i = 1; while (1) { scanf("%d", &x); if (x == 0) break; printf("Case %d: %d)\n", i, x); } return 0; }
#include <stdio.h> int main() { int x, i = 1; while (1) { scanf("%d", &x); if (x == 0) break; printf("Case %d: %d\n", i, x); i++; } return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["+", 0, 52, 8, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 27, 17, 29]]
1
54
#include <iostream> using namespace std; int main() { // your code goes here int x = 100, i = 1; while (x) { cin >> x; if (x) cout << "Case " << i << ": " << x << endl; } return 0; }
#include <iostream> using namespace std; int main() { // your code goes here int x = 100, i = 1; while (x) { cin >> x; if (x) cout << "Case " << i << ": " << x << endl; i++; } 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
55
#include <iostream> using namespace std; int main() { int i = 1; while (1) { int x; cin >> x; if (x == 0) break; cout << "Cace" << " " << i << ":" << " " << x << endl; ++i; } return 0; }
#include <iostream> using namespace std; int main() { int i = 1; while (1) { int x; cin >> x; if (x == 0) break; cout << "Case" << " " << i << ":" << " " << x << endl; ++i; } return 0; }
[["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
68
#include <stdio.h> #include <iostream> using namespace std; int main() { int i = 1; int x; while (1) { cin >> x; if (x == 0) break; cout << "Case" << ' ' << i << ':' << ' ' << x; i++; } return 0; }
#include <stdio.h> #include <iostream> using namespace std; int main() { int i = 1; int x; while (1) { cin >> x; if (x == 0) break; cout << "Case" << ' ' << i << ':' << ' ' << x << endl; i++; } return 0; }
[["+", 0, 52, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22]]
1
68
#include <iostream> using namespace std; int main() { int i, x; for (i = 1; i < 10000; i++) { cin >> x; if (x == 0) { break; } cout << "Case " << i << ":" << x << endl; } return 0; }
#include <iostream> using namespace std; int main() { int i, x; for (i = 1; i <= 10000; i++) { cin >> x; if (x == 0) { break; } cout << "Case " << i << ": " << x << endl; } return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
65
#include <iostream> using namespace std; int main() { int i = 0; int num; while (num > 0) { cin >> num; if (num == 0) { break; } i++; cout << "Case " << i << ": " << num << endl; } return 0; }
#include <iostream> using namespace std; int main() { int i = 0; int num; while (true) { cin >> num; if (num == 0) { break; } i++; cout << "Case " << i << ": " << num << endl; } return 0; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 31, 22], ["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 47], ["-", 8, 9, 0, 52, 15, 339, 51, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 51, 146]]
1
64
#include <stdio.h> int main(void) { int testCases[10001] = {0}; int testNum = 0; for (int i = 0; i < 10001; i++) { scanf("%d", &testCases[i]); if (testCases[i] == 0) { break; } testNum++; } for (int i = 0; i < testNum; i++) { printf("Case %d: %d\n", i, testCases[i]); } return...
#include <stdio.h> int main(void) { int testCases[10001] = {0}; int testNum = 0; for (int i = 0; i < 10001; i++) { scanf("%d", &testCases[i]); if (testCases[i] == 0) { break; } testNum++; } for (int i = 0; i < testNum; i++) { printf("Case %d: %d\n", (i + 1), testCases[i]); } ...
[["+", 0, 1, 0, 2, 3, 4, 0, 23, 0, 24], ["+", 0, 2, 3, 4, 0, 23, 0, 16, 17, 72], ["+", 0, 2, 3, 4, 0, 23, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 23, 0, 25]]
1
103
#include <stdio.h> int main() { int n, j, i = 0; int set[15000] = {0}; while (1) { scanf("%d", &set[i]); if (set[i] == 0) { break; } i++; } for (j = 0; j <= i; j++) { printf("Case %d: %d\n", j + 1, set[j]); } return 0; }
#include <stdio.h> int main() { int n, j, i = 0; int set[12000] = {0}; while (1) { scanf("%d", &set[i]); if (set[i] == 0) { break; } i++; } for (j = 0; j < i; j++) { printf("Case %d: %d\n", j + 1, set[j]); } return 0; }
[["-", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["+", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18]]
1
97
#include <iostream> using namespace std; int main() { int x = 1; int i = 1; while (x != 0) { cin >> x; if (x == 0) { break; } cout << "Case" << " " << i << " " << x << endl; i++; } return 0; }
#include <iostream> using namespace std; int main() { int x = 1; int i = 1; while (x != 0) { cin >> x; if (x == 0) { break; } cout << "Case" << " " << i << ":" << " " << x << endl; i++; } return 0; }
[["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 1, 0, 16, 31, 16, 31, 16, 17, 151], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62]]
1
70
#include <iostream> using namespace std; int main() { int x, i = 0; while (1) { cin >> x; i++; if (x == 0) break; cout << "Case" << i << ":" << x << endl; } return 0; }
#include <iostream> using namespace std; int main() { int x, i = 0; while (1) { cin >> x; i++; if (x == 0) break; cout << "Case " << i << ": " << x << endl; } return 0; }
[["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
59
#include <cstdio> #include <iostream> using namespace std; int main() { int t = 0; int x; while (cin >> x && x) { printf("Case :%d %d\n", ++t, x); } return 0; }
#include <cstdio> #include <iostream> using namespace std; int main() { int t = 0; int x; while (cin >> x && x) { printf("Case %d: %d\n", ++t, x); } return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
48
#include <iostream> using namespace std; int main() { int a, b; b = 1; while (1) { cin >> a; if (a == 0) break; cout << "case " << b << ": " << a << endl; b++; } }
#include <iostream> using namespace std; int main() { int a, b; a = 0; b = 1; while (1) { cin >> a; if (a == 0) break; cout << "Case " << b << ": " << a << endl; b++; } }
[["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
58
#include <stdio.h> int main(void) { int x, c; c = 1; while (scanf("%d", &x), x != 0) { if (x == 0) break; printf("Case %d:%d\n", c, x); c++; } return 0; }
#include <stdio.h> int main(void) { int x, c; c = 1; while (scanf("%d", &x), x != 0) { if (x == 0) break; printf("Case %d: %d\n", c, x); c++; } return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
62
#include <cstdio> using namespace std; int main() { int i = 0; int dataArr[10000]; while (scanf("%d", &dataArr[i]), dataArr[i]) i++; for (int j = 0; j <= i - 1; j++) printf("case %d: %d\n", j + 1, dataArr[j]); return 0; }
#include <cstdio> using namespace std; int main() { int i = 0; int dataArr[10000]; while (scanf("%d", &dataArr[i]), dataArr[i]) i++; for (int j = 0; j <= i - 1; j++) printf("Case %d: %d\n", j + 1, dataArr[j]); return 0; }
[["-", 8, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 8, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
82
#include <iostream> using namespace std; main() { int A[10000], i = 0; while (cin >> A[i]) { if (A[i] == 0) break; else cout << "Case " << i + 1 << ": " << A[i]; ++i; } return 0; }
#include <iostream> using namespace std; main() { int A[10000], i = 0; while (cin >> A[i]) { if (A[i] == 0) break; else cout << "Case " << i + 1 << ": " << A[i] << endl; i++; } return 0; }
[["+", 0, 57, 75, 76, 0, 1, 0, 16, 17, 151], ["+", 0, 57, 75, 76, 0, 1, 0, 16, 12, 22], ["-", 0, 52, 8, 9, 0, 1, 0, 27, 17, 29], ["+", 0, 52, 8, 9, 0, 1, 0, 27, 17, 29]]
1
69
#include <iostream> using namespace std; int main() { int i = 0; int x; while (1) { cin >> x; if (x == 0) break; cout << "case " << ++i << ": " << "x" << '\n'; } }
#include <iostream> using namespace std; int main() { int i = 0; long x; while (1) { cin >> x; if (x == 0) break; cout << "Case " << ++i << ": " << x << '\n'; } }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 62]]
1
59
#include <iostream> using namespace std; int main() { int num[10000]; for (int i = 0; i < 10000; i++) { cin >> num[i]; if (num[i] == 0) break; } for (int j = 0; j < 10000; j++) { if (num[j] == 0) break; cout << "Case " << j << ": " << num[j] << endl; } return 0; }
#include <iostream> using namespace std; int main() { int num[10000]; for (int i = 0; i < 10000; i++) { cin >> num[i]; if (num[i] == 0) break; } for (int j = 0; j < 10000; j++) { if (num[j] == 0) break; cout << "Case " << j + 1 << ": " << num[j] << endl; } return 0; }
[["+", 31, 16, 31, 16, 31, 16, 12, 16, 17, 72], ["+", 31, 16, 31, 16, 31, 16, 12, 16, 12, 13]]
1
101
#include <stdio.h> int main() { int i, x; for (i = 1; i < 10000; i++) { scanf("%d", &x); if (x == 0) break; printf("Case %d: %d", i, x); } return 0; }
#include <stdio.h> int main() { int i, x; for (i = 1; i <= 10000; i++) { scanf("%d", &x); if (x == 0) break; printf("Case %d: %d\n", i, x); } return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
1
60
#include <iostream> int main() { for (int i = 0; true; ++i) { int x; std::cin >> x; if (x == 0) { break; } std::cout << "Case " << i << ": " << x << std::endl; } return 0; }
#include <iostream> int main() { for (int i = 0; true; ++i) { int x; std::cin >> x; if (x == 0) { break; } std::cout << "Case " << (i + 1) << ": " << x << std::endl; } return 0; }
[["+", 31, 16, 31, 16, 31, 16, 12, 23, 0, 24], ["+", 31, 16, 31, 16, 12, 23, 0, 16, 17, 72], ["+", 31, 16, 31, 16, 12, 23, 0, 16, 12, 13], ["+", 31, 16, 31, 16, 31, 16, 12, 23, 0, 25]]
1
64
#include <iostream> using namespace std; int main() { for (int i = 1;; i++) { int x; cin >> x; if (x == 0) break; cout << "case " << i << ": " << x << endl; } }
#include <iostream> using namespace std; int main() { for (int i = 1;; i++) { int x; cin >> x; if (x == 0) break; cout << "Case " << i << ": " << x << endl; } }
[["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
56
#include <iostream> using namespace std; int main() { ; int x, i; i = 1; while (1) { cin >> x; if (x == 0) { break; } cout << "Case" << i << ":" << x << endl; i++; } return 0; }
#include <iostream> using namespace std; int main() { ; int x, i; i = 1; while (1) { cin >> x; if (x == 0) { break; } cout << "Case " << i << ": " << x << endl; i++; } return 0; }
[["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
64
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { ios::sync_with_stdio(false); int a, i = 1; while (1) { cin >> a; if (a == 0) break; cout << "case " << i << ": " << a << endl; i++; } return 0; }
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { ios::sync_with_stdio(false); int a, i = 1; while (1) { cin >> a; if (a == 0) break; cout << "Case " << i << ": " << a << endl; i++; } return 0; }
[["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
70
// C++14 (Clang 3.8.0) #include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #includ...
// C++14 (Clang 3.8.0) #include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #includ...
[["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
114
#include <iostream> using namespace std; int main() { int x, i; i = 0; while (1) { cin >> x; if (x == 0) { break; } i++; cout << "Case " << i << ":" << x << endl; } return 0; }
#include <iostream> using namespace std; int main() { int x, i; i = 0; while (1) { cin >> x; if (x == 0) { break; } i++; cout << "Case " << i << ": " << x << endl; } return 0; }
[["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
63
#include <iostream> #include <vector> using namespace std; int main() { vector<int> a; int b = 0; do { cin >> b; a.push_back(b); } while (b != 0); for (int i = 1; a[i] != 0; ++i) { cout << "Case " << i << ": " << a[i - 1] << endl; } return 0; }
#include <iostream> #include <vector> using namespace std; int main() { vector<int> a; int b = 0; do { cin >> b; a.push_back(b); } while (b != 0); for (int i = 1; a[i - 1] != 0; ++i) { cout << "Case " << i << ": " << a[i - 1] << endl; } return 0; }
[["+", 15, 16, 31, 69, 341, 342, 0, 16, 17, 33], ["+", 15, 16, 31, 69, 341, 342, 0, 16, 12, 13]]
1
89
#include <bits/stdc++.h> using namespace std; #define lli long long #define FOR(i, a, b) for (lli i = (a); i < (b); i++) #define REP(i, n) for (lli i = 0; i < (n); i++) #define rep(i, n) for (lli i = 0; i < (n); i++) #define INF INT_MAX / 3 #define PB push_back #define pb push_back #define all(a) (a).begin(), (a), en...
#include <bits/stdc++.h> using namespace std; #define lli long long #define FOR(i, a, b) for (lli i = (a); i < (b); i++) #define REP(i, n) for (lli i = 0; i < (n); i++) #define rep(i, n) for (lli i = 0; i < (n); i++) #define INF INT_MAX / 3 #define PB push_back #define pb push_back #define all(a) (a).begin(), (a), en...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
107
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <fstream> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define REP(i, n) for (int i = 0; i < n; ++i) #define FOR(i, a, b) for (int i = a; i...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <fstream> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define REP(i, n) for (int i = 0; i < n; ++i) #define FOR(i, a, b) for (int i = a; i...
[["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 12, 22]]
1
140
#include <iostream> int main(void) { int i = 0; int x[10000]; while (1) { std::cin >> x[i]; if (x[i] == 0) break; i = i + 1; } for (int j = 0; j < i; j++) std::cout << "Case " << j + 1 << ":" << x[j] << std::endl; return 0; }
#include <iostream> int main(void) { int i = 0; int x[10000]; while (1) { std::cin >> x[i]; if (x[i] == 0) break; i = i + 1; } for (int j = 0; j < i; j++) std::cout << "Case " << j + 1 << ": " << x[j] << std::endl; return 0; }
[["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
94
#include <iostream> using namespace std; int main() { int x, i; for (i = 1;; i++) { cin >> x; if (x == 0) break; cout << "Case " << i << "; " << x << endl; } return 0; }
#include <iostream> using namespace std; int main() { int x, i; for (i = 1;; i++) { cin >> x; if (x == 0) break; cout << "Case " << i << ": " << x << endl; } return 0; }
[["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
60
#include <iostream> using namespace std; int main() { int x; for (int i = 1; i <= 10000; i++) { cin >> x; if (x == 0) break; cout << "Case" << " " << i << ";" << " " << x << endl; } return 0; }
#include <iostream> using namespace std; int main() { int x; for (int i = 1; i <= 10000; i++) { cin >> x; if (x == 0) break; cout << "Case" << " " << i << ":" << " " << x << endl; } return 0; }
[["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
70
#include <iostream> using namespace std; int main() { int i = 1; int x = 0; while (1) { cin >> x; if (x == 0) break; cout << "Case " << i << ": " << x; i = i + 1; } return 0; }
#include <iostream> using namespace std; int main() { int i = 1; int x = 0; while (1) { cin >> x; if (x == 0) break; cout << "Case " << i << ": " << x << "\n"; i = i + 1; } return 0; }
[["+", 0, 52, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 62], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 44]]
1
63
#include <iostream> using namespace std; int main() { int n, count = 1; while (cin >> n) { if (n == 0) return 0; cout << "Case " << count << ": " << n << endl; } }
#include <iostream> using namespace std; int main() { int n, count = 1; while (cin >> n) { if (n == 0) return 0; cout << "Case " << count << ": " << n << endl; count++; } }
[["+", 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
52
#include <stdio.h> int main() { int i = 0; int x; while (1) { i++; scanf("%d ", &x); if (x == 0) { break; } printf("Case %d: %d", i, x); } return 0; }
#include <stdio.h> int main() { int i = 0; int x; while (1) { i++; scanf("%d ", &x); if (x == 0) { break; } printf("Case %d: %d\n", i, x); } return 0; }
[["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
1
59
#include <algorithm> #include <cstdio> #include <iostream> #include <math.h> #include <queue> #include <set> #include <string> #include <vector> #define INF 100000000 #define MAX_N 10000 #define MAX_M 100 typedef long long int ll; using namespace std; int main() { int x; int i = 0; while (true) { scanf("...
#include <algorithm> #include <cstdio> #include <iostream> #include <math.h> #include <queue> #include <set> #include <string> #include <vector> #define INF 100000000 #define MAX_N 10000 #define MAX_M 100 typedef long long int ll; using namespace std; int main() { int x; int i = 0; while (true) { scanf("...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
94
#include <iostream> int main() { int x; for (int i = 0; std::cin >> x, x; ++i) { std::cout << "Case " << i << ": " << x << std::endl; } }
#include <iostream> int main() { int x; for (int i = 1; std::cin >> x, x; ++i) { std::cout << "Case " << i << ": " << x << std::endl; } }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
51
#include <iostream> using namespace std; int main(void) { int input, inc = 1; while (1) { cin >> input; if (input == 0) { break; } cout << "Case " << inc << "; " << input << "\n"; inc++; } return 0; }
#include <iostream> using namespace std; int main(void) { int input, inc = 1; while (1) { cin >> input; if (input == 0) { break; } cout << "Case " << inc << ": " << input << "\n"; inc++; } return 0; }
[["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
64
#include <iostream> using namespace std; int main() { int x, cnt = 1; for (;;) { cin >> x; if (x == 0) { break; } else { cout << "Case" << " " << cnt << ":" << " " << x << endl; } } return 0; }
#include <iostream> using namespace std; int main() { int x, cnt = 1; for (;;) { cin >> x; if (x == 0) { break; } else { cout << "Case" << " " << cnt << ":" << " " << x << endl; } cnt++; } return 0; }
[["+", 0, 7, 8, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 7, 8, 9, 0, 1, 0, 27, 17, 29], ["+", 8, 9, 0, 7, 8, 9, 0, 1, 0, 35]]
1
70
#include <iostream> using namespace std; int main() { int x, i = 0; while (1) { cin >> x; if (x == 0) break; else i++; cout << "Case " << i << ":" << x << "\n"; } return 0; }
#include <iostream> using namespace std; int main() { int x, i = 0; while (1) { cin >> x; if (x == 0) break; else i++; cout << "Case " << i << ": " << x << "\n"; } return 0; }
[["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
62
#include <iostream> using namespace std; int x; int i = 1; int main() { cin >> x; while (x != 0) { cout << "Case " << i << ": " << x; ++i; cin >> x; } }
#include <iostream> using namespace std; int x; int i = 1; int main() { cin >> x; while (x != 0) { cout << "Case " << i << ": " << x << endl; ++i; cin >> x; } }
[["+", 0, 52, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22]]
1
53
#include <stdio.h> int main(void) { int c; for (int i = 1;; i++) { scanf("%d", &c); if (c == 0) { break; } printf("Case %d: %d", i, c); } return 0; }
#include <stdio.h> int main(void) { int c; for (int i = 1;; i++) { scanf("%d", &c); if (c == 0) { break; } printf("Case %d: %d\n", i, c); } return 0; }
[["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
1
59
class Main index = 1 while(true) x = gets.to_i break if x == 0 puts "Case #{index}: #{x}" end end
class Main index = 1 while(true) x = gets.to_i break if x == 0 puts "Case #{index}: #{x}" index += 1 end end
[["+", 8, 736, 0, 89, 8, 170, 0, 755, 31, 22], ["+", 8, 736, 0, 89, 8, 170, 0, 755, 17, 107], ["+", 8, 736, 0, 89, 8, 170, 0, 755, 12, 612]]
4
32
cnt = 0 while true input = STDIN.gets cnt = 1 break if (input.to_i == 0) puts "Case "+cnt.to_s+": "+input cnt += 1 end
cnt = 0 while true input = STDIN.gets cnt += 1 break if (input.to_i == 0) puts "Case "+cnt.to_s+": "+input end
[["-", 0, 493, 0, 89, 8, 170, 0, 662, 0, 32], ["+", 0, 493, 0, 89, 8, 170, 0, 755, 17, 107], ["-", 0, 493, 0, 89, 8, 170, 0, 755, 31, 22], ["-", 0, 493, 0, 89, 8, 170, 0, 755, 17, 107], ["-", 0, 493, 0, 89, 8, 170, 0, 755, 12, 612]]
4
40
i = 0 while (no = gets.to_i) != 0 puts "Case #{i}:#{no}" i += 1 end
i = 1 while (no = gets.to_i) != 0 puts "Case #{i}: #{no}" i += 1 end
[["-", 36, 36, 36, 36, 0, 493, 0, 662, 12, 612], ["+", 36, 36, 36, 36, 0, 493, 0, 662, 12, 612], ["-", 8, 170, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 8, 170, 0, 652, 3, 4, 0, 557, 0, 6]]
4
28
i=1 loop do x = gets.to_i if x == 0 then break end puts "Count#{i} : #{x}" i+=1 end
i = 1 loop do x = gets.to_i if x == 0 then break end puts "Case #{i}: #{x}" i+=1 end
[["-", 8, 736, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 8, 736, 0, 652, 3, 4, 0, 557, 0, 6]]
4
32
ARGF.each.with_index(1) do |num, i| z = num.to_i break if z == 0 puts "Case #{i}: "#{z}" end
ARGF.each.with_index(1) do |num, i| z = num.to_i break if z == 0 puts "Case #{i}: #{z}" end
[["+", 0, 652, 3, 4, 0, 557, 0, 284, 0, 775], ["+", 0, 652, 3, 4, 0, 557, 0, 284, 0, 22], ["+", 0, 652, 3, 4, 0, 557, 0, 284, 0, 46]]
4
34
ary = [] ARGF.each_line do |line| x = line.to_i if x != 0 ary << x.to_i end end x.each.with_index(1) do |num, i| puts "Case #{i}: #{num}" end
ary = [] ARGF.each_line do |line| x = line.to_i break if x == 0 ary << x.to_i end ary.each.with_index(1) do |num, i| puts "Case #{i}: #{num}" end
[["+", 196, 737, 8, 736, 0, 751, 8, 94, 0, 94], ["-", 196, 737, 8, 736, 0, 121, 15, 738, 17, 79], ["+", 196, 737, 8, 736, 0, 751, 15, 738, 17, 60], ["-", 0, 652, 196, 737, 8, 736, 0, 121, 0, 444], ["-", 36, 36, 0, 493, 0, 652, 486, 652, 486, 22], ["+", 36, 36, 0, 493, 0, 652, 486, 652, 486, 22]]
4
53
i=1 ARGF.each_line do |line| break if line == "0" puts "Case #{i}: #{line}" i += 1 end
i=1 ARGF.each_line do |line| break if line.chomp == "0" puts "Case #{i}: #{line}" i += 1 end
[["+", 8, 736, 0, 751, 15, 738, 31, 652, 17, 131], ["+", 8, 736, 0, 751, 15, 738, 31, 652, 735, 22]]
4
32
ARGF.each_line.with_index(1) do |line, i| x = line.to_i break if x == 0 puts "#{Case} #{i}: #{x}" end
ARGF.each.with_index(1) do |line, i| x = line.to_i break if x == 0 puts "Case #{i}: #{x}" end
[["-", 36, 36, 0, 493, 0, 652, 486, 652, 735, 22], ["+", 36, 36, 0, 493, 0, 652, 486, 652, 735, 22], ["-", 0, 652, 3, 4, 0, 557, 0, 284, 0, 775], ["-", 0, 652, 3, 4, 0, 557, 0, 284, 0, 743], ["-", 0, 652, 3, 4, 0, 557, 0, 284, 0, 46], ["-", 8, 736, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 8, 736, 0, 652, 3, 4, 0, 557, 0, 6]]
4
39
i=0 while line = gets i+=1 if x.to_i == 0 break end puts "Case #{i}: #{x}" end
i=0 while x = gets i+=1 if x.to_i == 0 break end puts "Case #{i}: #{x}" end
[["-", 36, 36, 0, 493, 0, 89, 15, 662, 31, 22], ["+", 36, 36, 0, 493, 0, 89, 15, 662, 31, 22]]
4
30
i = 0 while x = gets do if x.to_i != 0 puts "Case #{i}: #{x}" i += 1 else break end end
i = 1 while x = gets do if x.to_i != 0 puts "Case #{i}: #{x}" i += 1 else break end end
[["-", 36, 36, 36, 36, 0, 493, 0, 662, 12, 612], ["+", 36, 36, 36, 36, 0, 493, 0, 662, 12, 612]]
4
32
a = [] until a.last == 0 do a.push STDIN.gets.to_i end cnt = 0 a.each do |i| cnt += 1 puts "Case #{cnt}: #{i}" end
a = [] until a.last == 0 do a.push STDIN.gets.to_i end cnt = 0 a.each do |i| cnt += 1 puts "Case #{cnt}: #{i}" unless i == 0 end
[["+", 0, 652, 196, 737, 8, 736, 0, 745, 0, 747], ["+", 196, 737, 8, 736, 0, 745, 15, 738, 31, 22], ["+", 196, 737, 8, 736, 0, 745, 15, 738, 17, 60], ["+", 196, 737, 8, 736, 0, 745, 15, 738, 12, 612]]
4
45
num = gets.to_i i = 1 while num != 0 do print "Case ", i ,":", num ,"\n" num = gets.to_i i += 1 end
num = gets.to_i i = 1 while num != 0 do print "Case ", i ,": ", num ,"\n" num = gets.to_i i += 1 end
[["-", 8, 170, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 8, 170, 0, 652, 3, 4, 0, 557, 0, 6]]
4
38
i = 0 loop do i += 1 number = gets.to_i if number == 0 break # else # puts "case #{i}: #{number}" end puts "case #{i}: #{number}" end
i = 0 loop do i += 1 number = gets.to_i if number == 0 break # else # puts "case #{i}: #{number}" end puts "Case #{i}: #{number}" end
[["-", 8, 736, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 8, 736, 0, 652, 3, 4, 0, 557, 0, 6]]
4
33
i = 0 loop do i += 1 number = gets.to_i if number == 0 break else puts "case #{i}: #{number}" end end
i = 0 loop do i += 1 number = gets.to_i if number == 0 break else puts "Case #{i}: #{number}" end #puts "Case #{i}: #{number}" end
[["-", 75, 95, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 75, 95, 0, 652, 3, 4, 0, 557, 0, 6]]
4
32
num = [] loop do x = gets.chomp.to_i if x == 0 then break else num << x end end i = 1 num.map do |x| if x != 0 puts 'Case ' + i.to_s + ':' + x.to_s else break end i += 1 end
num = [] loop do x = gets.chomp.to_i if x == 0 then break else num << x end end i = 1 num.map do |x| if x != 0 puts 'Case ' + i.to_s + ': ' + x.to_s else break end i += 1 end
[["-", 3, 4, 0, 738, 31, 738, 12, 557, 0, 6], ["+", 3, 4, 0, 738, 31, 738, 12, 557, 0, 6]]
4
62
i=0 while true do num = gets.to_i if num == 0 break end i=i+1 puts "case #{i}: #{num}" end
i=0 while true do num = gets.to_i if num == 0 break end i=i+1 puts "Case #{i}: #{num}" end
[["-", 8, 170, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 8, 170, 0, 652, 3, 4, 0, 557, 0, 6]]
4
34
j=1 while 1 i=gets.to_i if i==0 break end print "Case#{j}:#{i}\n" j+=1 end
j=1 while 1 i=gets.to_i if i==0 break end print "Case #{j}: #{i}\n" j+=1 end
[["-", 8, 170, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 8, 170, 0, 652, 3, 4, 0, 557, 0, 6]]
4
32
i = 1 while (x = gets.chomp) != '0' puts "Case #{i}:#{x}" i+=1 end
i = 1 while (x = gets.chomp) != '0' puts "Case #{i}: #{x}" i+=1 end
[["-", 8, 170, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 8, 170, 0, 652, 3, 4, 0, 557, 0, 6]]
4
30
#!/usr/local/bin/ruby i=0 while x=gets.to_i i+=1 if x==0 break end printf("Case %d:%d\n",i,x) end
#!/usr/local/bin/ruby i=0 while x=gets.to_i i+=1 if x==0 break end printf("Case %d: %d\n",i,x) end
[["-", 8, 170, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 8, 170, 0, 652, 3, 4, 0, 557, 0, 6]]
4
31
i =0 while true x = STDIN.gets i +=1 break if x.to_i == 0 puts "Case#{i}: #{x}" end
i =0 while true x = STDIN.gets i +=1 break if x.to_i == 0 puts "Case #{i}: #{x}" end
[["-", 8, 170, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 8, 170, 0, 652, 3, 4, 0, 557, 0, 6]]
4
32
arr = Array.new while str = STDIN.gets break if str.chomp == "0" arr.push(str.to_i) end i=0 until arr.length==i print "Case ",i+1, ":", arr[i],"\n" i=i+1 end
arr = Array.new while str = STDIN.gets break if str.chomp == "0" arr.push(str.to_i) end i=0 until arr.length==i print "Case ",i+1, ": ", arr[i],"\n" i=i+1 end
[["-", 8, 170, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 8, 170, 0, 652, 3, 4, 0, 557, 0, 6]]
4
65
counter=1 x=gets.to_i until x==0 do printf("case %d:%d\n",counter,x) x=gets.to_i counter=counter+1 end
counter=1 x=gets.to_i until x==0 do printf("Case %d: %d\n",counter,x) x=gets.to_i counter=counter+1 end
[["-", 8, 170, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 8, 170, 0, 652, 3, 4, 0, 557, 0, 6]]
4
35
i = 0 a = Array.new a[0] = gets.to_i while a[i] != 0 do i += 1 a[i] = gets.to_i end i = 0 while a[i] != 0 do puts "Case #{i}: #{a[i]}" i += 1 end
i = 0 a = Array.new a[0] = gets.to_i while a[i] != 0 do i += 1 a[i] = gets.to_i end i = 0 while a[i] != 0 do puts "Case #{i+1}: #{a[i]}" i += 1 end
[["+", 3, 4, 0, 557, 0, 284, 0, 738, 17, 72], ["+", 3, 4, 0, 557, 0, 284, 0, 738, 12, 612]]
4
65
i = 1; while (n = gets.chomp.to_i) != 0 do puts "Case#{i}: #{n}" i = i + 1 end
i = 1; while (n = gets.chomp.to_i) != 0 do puts "Case #{i}: #{n}" i = i + 1 end
[["-", 8, 170, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 8, 170, 0, 652, 3, 4, 0, 557, 0, 6]]
4
34