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 <stdio.h> int main() { int data[30]; int dat; int n = 0; int i; while (1) { scanf("%d", &dat); if (dat == 0) break; else { data[n] = dat; } ++n; } for (i = 0; i < n; i++) { printf("Case %d: %d\n", i + 1, data[i]); } return 0; }
#include <stdio.h> int main() { int data[30000]; int dat; int n = 0; int i; while (1) { scanf("%d", &dat); if (dat == 0) break; else { data[n] = dat; } ++n; } for (i = 0; i < n; i++) { printf("Case %d: %d\n", i + 1, data[i]); } return 0; }
[["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13]]
0
97
#include <stdio.h> #include <stdlib.h> int main() { int i, input; char str[256]; for (i = 0;; i++) { gets(str); input = atoi(str); if (input == 0) break; printf("Case %d: %d\n", i, input); } return 0; }
#include <stdio.h> #include <stdlib.h> int main() { int i, input; char str[256]; for (i = 1;; i++) { gets(str); input = atoi(str); if (input == 0) break; printf("Case %d: %d\n", i, input); } return 0; }
[["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13]]
0
68
#include <stdio.h> int main() { int i = 1, x; while (1) { scanf("%d", &x); if (x == 0) break; printf("Case %d: %d", i, x); ++i; } return 0; }
#include <stdio.h> int main() { int i = 1, x; 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, 44]]
0
56
main(i, n) { while (scanf("%d", &n), n) { printf("Case %d: %d\n", ++i, n); } return 0; }
main(i, n) { while (scanf("%d", &n), n) { printf("Case %d: %d\n", i++, n); } return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 27, 17, 29], ["+", 0, 1, 0, 2, 3, 4, 0, 27, 17, 29]]
0
40
#include <stdio.h> int main(int argc, const char *argv[]) { int x; int count = 1; scanf("%d", &x); while (x != 0) { printf("Case %d: %d", count, x); count++; scanf("%d", &x); } return 0; }
#include <stdio.h> int main(int argc, const char *argv[]) { int x; int count = 1; scanf("%d", &x); while (x != 0) { printf("Case %d: %d\n", count, x); count++; scanf("%d", &x); } return 0; }
[["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
0
70
#include <stdio.h> int main() { int i = 1; int x; scanf("%d", &x); while (x != 0) { printf("Case %d: %d", i, x); i++; scanf("%d", &x); } return 0; }
#include <stdio.h> int main() { int i = 1; int x; scanf("%d", &x); while (x != 0) { printf("Case %d: %d\n", i, x); i++; scanf("%d", &x); } return 0; }
[["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
0
61
#include <stdio.h> int main(void) { int a, i; int out; i = 1; while (1) { scanf("%d", &a); if (a == 0) break; printf("Case %d: %d", i, a); i++; } return 0; }
#include <stdio.h> int main(void) { int a, i; int out; i = 1; while (1) { scanf("%d", &a); if (a == 0) break; printf("Case %d: %d\n", i, a); i++; } return 0; }
[["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
0
62
#include <stdio.h> int main(void) { int i; int dat; for (i = 0;; i++) { scanf("&d", &dat); if (dat == 0) break; printf("Case %d: %d\n", &i, &dat); } return 0; }
#include <stdio.h> int main(void) { int i; int dat; for (i = 1;; i++) { scanf("%d", &dat); if (dat == 0) break; printf("Case %d: %d\n", i, dat); } return 0; }
[["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67]]
0
62
#include <stdio.h> int main(void) { int i = 1, x; while (1) { scanf("%d", &x); if (x == 0) { break; } else { printf("Case %d: %d", i, x); i++; } } return 0; }
#include <stdio.h> int main(void) { int i = 1, x; while (1) { scanf("%d", &x); if (x == 0) { break; } else { printf("Case %d: %d\n", i, x); i++; } } return 0; }
[["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
0
62
#include <stdio.h> int main(int argc, const char *argv[]) { int x, i = 1; while (1) { scanf("%d\n", &x); if (x == 0) { break; } printf("case %d: %d\n", i, x); i++; } return 0; }
#include <stdio.h> int main(int argc, const char *argv[]) { int x, i = 1; while (1) { scanf("%d\n", &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]]
0
69
#include <stdio.h> int main(void) { int i = 0, x; while (scanf("%d", &x) != EOF && x != 0) { i++; printf("Case %d:%d\n", i, x); } // printf("Case %d:%d\n",i,x); return 0; }
#include <stdio.h> int main(void) { int i = 0, x; while (scanf("%d", &x) != EOF && x != 0) { i++; printf("Case %d: %d\n", i, x); } // printf("Case %d:%d\n",i,x); return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
55
#include <stdio.h> int main(void) { int i; int j; for (i = 1;; i++) { scanf("%d", &j); if (j == 0) break; printf("Case %d:%d\n", i, j); } return 0; }
#include <stdio.h> int main(void) { int i; int j; for (i = 1;; i++) { scanf("%d", &j); if (j == 0) break; printf("Case %d: %d\n", i, j); } return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
60
#include <stdio.h> int main() { int i = 0, n = 0, a; while (1) { scanf("%d", &a); if (a == 0) break; printf("case %d: %d\n", ++i, a); } return 0; }
#include <stdio.h> int main() { int i = 0, a; while (1) { scanf("%d", &a); if (a == 0) break; printf("Case %d: %d\n", ++i, a); } return 0; }
[["-", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
59
#include <stdio.h> int main(void) { int i, num; for (i = 1;; i++) { scanf("%d", &num); if (num == 0) break; printf("Case 1: %d\n", num); } return 0; }
#include <stdio.h> int main(void) { int i, num; for (i = 1;; i++) { scanf("%d", &num); if (num == 0) break; printf("Case %d: %d\n", i, num); } 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, 1, 0, 2, 3, 4, 0, 21], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]]
0
57
#include <stdio.h> int main(void) { int x; int i; scanf("%d", &x); i = 1; while (!x) { printf("Case %d: %d\n", i, x); i++; scanf("%d", &x); } return (0); }
#include <stdio.h> int main(void) { int x; int i; scanf("%d", &x); i = 1; while (x != 0) { printf("Case %d: %d\n", i, x); i++; scanf("%d", &x); } return (0); }
[["-", 8, 9, 0, 52, 15, 23, 0, 91, 17, 111], ["+", 8, 9, 0, 52, 15, 23, 0, 16, 17, 79], ["+", 8, 9, 0, 52, 15, 23, 0, 16, 12, 13]]
0
66
#include <stdio.h> int main(void) { int x; int i; scanf("%d", &x); i = 1; while (!x) { printf("Case %d: %d\n", i, x); i++; scanf("%d", &x); } return (0); }
#include <stdio.h> int main(void) { int x; int i; scanf("%d", &x); i = 1; while (x) { printf("Case %d: %d\n", i, x); i++; scanf("%d", &x); } return (0); }
[["-", 8, 9, 0, 52, 15, 23, 0, 91, 17, 111]]
0
66
#include <stdio.h> int main() { int i, a[65535], t; for (i = 0;; i++) { scanf("%d", a + i); if (a[i] == 0) { break; } } for (i = 0; a[i] != 0; i++) { printf("Case %d: %d", i + 1, a[i]); } return 0; }
#include <stdio.h> int main() { int i, a[65535]; for (i = 0;; i++) { scanf("%d", a + i); if (a[i] == 0) { break; } } for (i = 0; a[i] != 0; i++) { printf("Case %d: %d\n", i + 1, a[i]); } return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
0
91
#include <stdio.h> int main(void) { int flag = 1, buf, i = 1; while (flag == 1) { scanf("%d", &buf); if (buf != 0) { printf("Case %d:%d\n", i, buf); i++; } else { flag = 0; } } return 0; }
#include <stdio.h> int main(void) { int flag = 1, buf, i = 1; while (flag == 1) { scanf("%d", &buf); if (buf != 0) { printf("Case %d: %d\n", i, buf); i++; } else { flag = 0; } } return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
71
#include <stdio.h> int main(void) { int x, i = 1; while (1) { scanf("%d", &x); if (x == 0) { break; } printf("Case %d: %d\n\n", i++, x); } return 0; }
#include <stdio.h> int main(void) { int x, i = 1; while (1) { 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]]
0
59
#include <stdio.h> int main() { int x = 1; int i = 1; while (x != 0) { scanf("%d", &x); if (x != 0) { printf("Case %d: %d", i, x); } i = i + 1; } return 0; }
#include <stdio.h> int main() { int x = 1; int i = 1; while (x != 0) { scanf("%d", &x); if (x != 0) { printf("Case %d: %d\n", i, x); } i = i + 1; } return 0; }
[["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
0
64
#include <stdio.h> int main() { int i, hoge; for (i = 0;; i++) { scanf("%d", &hoge); if (hoge != 0) printf("Case %d;%d\n", i + 1, hoge); else break; } return 0; }
#include <stdio.h> int main() { int i, hoge; for (i = 0;; i++) { scanf("%d", &hoge); if (hoge != 0) printf("Case %d: %d\n", i + 1, hoge); else break; } return 0; }
[["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
61
#include <stdio.h> int main(void) { int x, i; for (i = 1;; i++) { scanf("%d", &x); if (!x) break; printf("Case %d: %d", i, x); } return 0; }
#include <stdio.h> int main(void) { int x, i; for (i = 1;; i++) { scanf("%d\n", &x); if (!x) break; printf("Case %d: %d\n", i, x); } return 0; }
[["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
0
57
#include <stdio.h> int main(void) { int a, b = 1; scanf("%d", &a); while (a != 0) { printf("Case %d: %d\n", a, b); b++; scanf("%d", &a); } return 0; }
#include <stdio.h> int main(void) { int a, b = 1; scanf("%d", &a); while (a != 0) { printf("Case %d: %d\n", b, a); b++; scanf("%d", &a); } 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]]
0
62
#include <stdio.h> int main(void) { int i = 1, x; while (scanf("%d", &x)) { if (x == 0) break; printf("Case%d: %d\n", i, x); i++; } return 0; }
#include <stdio.h> int main(void) { int i = 1, x; while (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]]
0
56
#include <stdio.h> int main() { int a, i = 0; for (;;) { i++; scanf("%d", &a); if (a == 0) break; printf("case %d: %d\n", i, a); } return 0; }
#include <stdio.h> int main() { int a, i = 0; for (;;) { i++; scanf("%d", &a); if (a == 0) break; printf("Case %d: %d\n", i, a); } return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
58
#include <stdio.h> main() { int i = 0, c; scanf("%d", &c); while (c != '0') { printf("Case %d: %d\n", ++i, c); scanf("%d", &c); return 0; } }
#include <stdio.h> main() { int i = 0, c; scanf("%d", &c); while (c != 0) { printf("Case %d: %d\n", ++i, c); scanf("%d", &c); } return 0; }
[["-", 0, 52, 15, 23, 0, 16, 12, 103, 0, 104], ["+", 0, 30, 0, 9, 0, 52, 8, 9, 0, 46], ["-", 0, 30, 0, 9, 0, 52, 8, 9, 0, 46]]
0
61
x; main(i) { for (; scanf("%d", &x) * x; printf("case %d: %d\n", i++, x)) ; }
x; main(i) { for (; scanf("%d", &x) * x; printf("Case %d: %d\n", i++, x)) ; }
[["-", 0, 7, 26, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 7, 26, 2, 3, 4, 0, 5, 0, 6]]
0
37
main(a, i) { for (i = 0; scanf("%d", a) * a; printf("Case %d: %d", ++i, a)) ; }
main(a, i) { for (i = 0; scanf("%d", &a) * a; printf("Case %d: %d\n", ++i, a)) ; }
[["+", 15, 16, 31, 2, 3, 4, 0, 66, 17, 67], ["+", 0, 7, 26, 2, 3, 4, 0, 5, 0, 44]]
0
38
#include <stdio.h> int main(int argc, const char *argv[]) { int a; int counter = 0; while (1) { scanf("%d", &a); if (a == 0) { break; } counter++; printf("Case %d:%d\n", counter, a); } return 0; }
#include <stdio.h> int main(int argc, const char *argv[]) { int a; int counter = 0; while (1) { scanf("%d", &a); if (a == 0) { break; } counter++; printf("Case %d: %d\n", counter, a); } return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
69
#include <stdio.h> int main(int argc, const char *argv[]) { int x; int i = 1; while (1) { scanf("%d", &x); if (x == 0) { break; } else { printf("case %d: %d\n", i, x); i++; } } return 0; }
#include <stdio.h> int main(int argc, const char *argv[]) { int x; int i = 1; while (1) { scanf("%d", &x); if (x == 0) { break; } else { 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]]
0
72
#include <stdio.h> int main() { int i = 0, x; while (1) { ++i; scanf("%d", &x); if (x == 0) break; printf("Case%d %d\n", i, x); } return 0; }
#include <stdio.h> int main() { int i = 0, 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, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
57
#include <stdio.h> main() { int i, num; for (i = 0;; i++) { scanf("%d", &num); if (num == 0) break; printf("Case %d: %d\n", i, num); } return 0; }
#include <stdio.h> main() { int i, num; for (i = 1;; i++) { scanf("%d", &num); if (num == 0) break; printf("Case %d: %d\n", i, num); } return 0; }
[["-", 0, 30, 0, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 30, 0, 9, 0, 7, 10, 11, 12, 13]]
0
58
#include <stdio.h> #include <stdlib.h> int main() { int *x[128]; int i = 0; while (1) { scanf("%d", &x[i]); if (x[i] == 0) break; i++; } int j; for (j = 0; j < i; j++) { printf("Case %d: %d\n", j + 1, x[j]); } return 0; }
#include <stdio.h> #include <stdlib.h> int main() { int *x[10001]; int i = 0; while (1) { scanf("%d", &x[i]); if (x[i] == 0) break; i++; } int j; for (j = 0; j < i; j++) { printf("Case %d: %d\n", j + 1, x[j]); } return 0; }
[["-", 8, 9, 0, 43, 49, 84, 49, 80, 81, 13], ["+", 8, 9, 0, 43, 49, 84, 49, 80, 81, 13]]
0
93
int main() { int x, count; count = 1; while (1) { scanf("%d", &x); if (x == 0) { break; } printf("Case %d:%d\n", count, x); count++; } return 0; }
int main() { int x, count; count = 1; while (1) { scanf("%d", &x); if (x == 0) { break; } printf("Case %d: %d\n", count, x); count++; } return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
59
#include <stdio.h> int main() { int j, k, a[100]; j = 0; while (1) { scanf("%d", &a[j]); if (a[j] == 0) { break; } j++; } for (k = 0; k < j; k++) { printf("case %d: %d\n", k + 1, a[k]); } return 0; }
#include <stdio.h> int main() { int j, k, a[10000]; j = 0; while (1) { scanf("%d", &a[j]); if (a[j] == 0) { break; } j++; } for (k = 0; k < j; k++) { printf("Case %d: %d\n", k + 1, a[k]); } return 0; }
[["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
92
#include <stdio.h> main() { int x; int b = 0; while (1) { scanf("%d", &x); if (x == 0) break; b = b + 1; printf("Cace %d: %d\n", b, x); } return 0; }
#include <stdio.h> main() { int x; int b = 0; while (1) { scanf("%d", &x); if (x == 0) break; b = b + 1; printf("Case %d: %d\n", b, x); } return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
61
#include <stdio.h> main() { int x, b = 0; while (1) { scanf("%d", &x); b = b + 1; if (x == 0) { break; } printf("Case %d:%d\n", b, x); } return 0; }
#include <stdio.h> main() { int x, b = 0; while (1) { scanf("%d", &x); b = b + 1; if (x == 0) { break; } printf("Case %d: %d\n", b, x); } return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
62
#include <stdio.h> int main(void) { int i = 1, g; while (1) { scanf("%d", &g); if (g == 0) { break; } printf("Case%2d: %d\n", i, g); i++; } return 0; }
#include <stdio.h> int main(void) { int i = 1, g; while (1) { scanf("%d", &g); if (g == 0) { break; } printf("Case %d: %d\n", i, g); i++; } return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
60
#include <stdio.h> int main(void) { int i, x; i = 0; while (1) { scanf("%d", &x); if (x == 0) break; printf("case%d: %d\n", ++i, x); } return 0; }
#include <stdio.h> int main(void) { int i, x; i = 0; while (1) { 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, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
58
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <set> #include <string> #include <time.h> #include <utility> #include <vector> #define loop(i, a, b) for (int i = a; i < b; i++) #define rep(i, a) loop(i, 0, a) #define pb push_back #define mp make_pai...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <set> #include <string> #include <time.h> #include <utility> #include <vector> #define loop(i, a, b) for (int i = a; i < b; i++) #define rep(i, a) loop(i, 0, a) #define pb push_back #define mp make_pai...
[["-", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22]]
1
126
#include <cstdio> #include <iostream> using namespace std; int main() { int i = 1, x; while (1) { cin >> x; if (!x) break; printf("Case %d %d\n", i, x); i++; } }
#include <cstdio> #include <iostream> using namespace std; int main() { int i = 1, x; while (1) { cin >> x; if (!x) break; printf("Case %d: %d\n", i, x); i++; } }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
53
#include <iostream> using namespace std; int main() { int i, x; i = 1; while (cin >> x, x != 0) { cout << "Case " << i << " " << x << endl; i++; } return 0; }
#include <iostream> using namespace std; int main() { int i, x; i = 1; while (cin >> x, x != 0) { cout << "Case " << i << ": " << x << endl; i++; } return 0; }
[["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
55
#include <stdio.h> int main(void) { int x, i = 1; while (scanf("%d", &x), x) { printf("case %d: %d\n", i, x); i++; } return (0); }
#include <stdio.h> int main(void) { int x, i = 1; while (scanf("%d", &x), x) { 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]]
1
52
#define _CRT_SECURE_NO_WARNINGS #include <fstream> #include <iomanip> #include <iostream> #include <list> #include <math.h> #include <queue> #include <stack> #include <string> #include <vector> using namespace std; int main(int argc, char **argv) { int n; int count = 1; while (std::cin >> n && n != 0) { st...
#define _CRT_SECURE_NO_WARNINGS #include <fstream> #include <iomanip> #include <iostream> #include <list> #include <math.h> #include <queue> #include <stack> #include <string> #include <vector> using namespace std; int main(int argc, char **argv) { int n; int count = 1; while (std::cin >> n && n != 0) { st...
[["+", 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
82
#include <iostream> using namespace std; int main(void) { int cnt = 0; while (1) { int a; cin >> a; if (a == 0) { break; } cout << "Case " << cnt << ": " << a << endl; cnt++; } }
#include <iostream> using namespace std; int main(void) { int cnt = 0; while (1) { int a; cin >> a; if (a == 0) { break; } cout << "Case " << cnt + 1 << ": " << a << endl; cnt++; } }
[["+", 31, 16, 31, 16, 31, 16, 12, 16, 17, 72], ["+", 31, 16, 31, 16, 31, 16, 12, 16, 12, 13]]
1
60
#include <iostream> using namespace std; // Case i: x int main() { int i = 0; int x; while (1) { cin >> x; i++; if (x == 0) { break; } cout << "Case " << i << ":" << x << endl; } }
#include <iostream> using namespace std; // Case i: x int main() { int i = 0; int x; while (1) { cin >> x; i++; if (x == 0) { break; } cout << "Case " << i << ": " << x << endl; } }
[["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
60
#include "stdio.h" int main(void) { int r = 0; int n = 0; while (1) { scanf("%d", &n); if (n == 0) break; printf("Case %d %d\n", ++r, n); } return 0; }
#include "stdio.h" int main(void) { int r = 0; int n = 0; while (1) { scanf("%d", &n); if (n == 0) break; printf("Case %d: %d\n", ++r, n); } return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
61
#include <iostream> int main() { for (int x, t = 1;; t++) { std::cin >> x; if (x == 0) break; std::cout << "case" << t << ": " << x << std::endl; } return 0; }
#include <iostream> int main() { for (int x, t = 1;; t++) { std::cin >> x; if (x == 0) break; std::cout << "Case " << t << ": " << x << std::endl; } return 0; }
[["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
60
#include <iostream> using namespace std; int main() { int i = 1, x; while (1) { cin >> x; if (!x) break; cout << "case " << i << ": " << x; i++; } return 0; }
#include <iostream> using namespace std; int main() { int i = 1, x; while (1) { cin >> x; if (!x) 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, 52, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22]]
1
56
#include <cstdio> int main() { int t, n = 1; scanf("%d", &t); while (t) { printf("Case %d: %d", n++, t); scanf("%d", &t); } }
#include <cstdio> int main() { int t, n = 1; scanf("%d", &t); while (t) { printf("Case %d: %d\n", n++, t); scanf("%d", &t); } }
[["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
1
53
#include <stdio.h> int main() { int x = 0; // X?????????????¢???? int i = 0; for (i = 1;; i++) { scanf("%d", &x); //???????????? if (x == 0) { break; } printf("case%d:%d\n", i, x); //?????? } return 0; }
#include <stdio.h> int main() { int x = 0; // X?????????????¢???? int i = 0; for (i = 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, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
68
#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; }
#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; }
[["-", 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, 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]]
1
61
#include <bits/stdc++.h> 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 <bits/stdc++.h> 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]]
1
60
#include <iostream> using namespace std; int main() { int i = 1, a; while (true) { cin >> a; if (a == 0) break; cout << "Case " << i << ": " << a << endl; } }
#include <iostream> using namespace std; int main() { int i = 1, a; while (true) { cin >> a; if (a == 0) break; cout << "Case " << i << ": " << a << endl; i++; } }
[["+", 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
53
#include <iostream> #include <list> using namespace std; int main() { int a, t; t = 0; while (cin >> a, a) { t++; cout << "Case " << t << ":" << a << endl; } return 0; }
#include <iostream> using namespace std; int main() { int a, t; t = 0; while (cin >> a, a) { t++; cout << "Case " << t << ": " << a << endl; } return 0; }
[["-", 36, 36, 36, 36, 0, 30, 0, 135, 0, 138], ["-", 36, 36, 36, 36, 0, 30, 0, 135, 136, 137], ["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
55
#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
58
#include <cstdio> using namespace std; int main() { int x; for (int i = 0;; i++) { scanf("%d", &x); if (x == 0) break; printf("Case %d: %d\n", i, x); } return 0; }
#include <cstdio> using namespace std; int main() { int x; for (int i = 1;; i++) { scanf("%d", &x); if (x == 0) break; printf("Case %d: %d\n", i, x); } return 0; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
61
#include <iostream> #include <vector> using namespace std; int main() { int n; vector<int> v; for (;;) { cin >> n; if (n == 0) break; else v.push_back(n); } int i = 1; for (auto itr = v.begin(); itr != v.end(); itr++) { cout << "case " << i << ": " << *itr << endl; i++; ...
#include <iostream> #include <vector> using namespace std; int main() { int n; vector<int> v; for (;;) { cin >> n; if (n == 0) break; else v.push_back(n); } int i = 1; for (auto itr = v.begin(); itr != v.end(); itr++) { cout << "Case " << i << ": " << *itr << endl; i++; ...
[["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
102
#include <iostream> using namespace std; int main() { int x; for (int i = 1; cin >> x; i++) { if (x == 0) break; cout << "Case" << i << ": " << x << endl; } return 0; }
#include <iostream> using namespace std; int main() { int x; for (int i = 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]]
1
58
#include <stdio.h> int main(int argc, char *argv[]) { int a[10], i = 0; while (1) { scanf("%d", &a[i]); if (a[i] == 0) break; i++; } for (int j = 0; j < i; j++) { printf("Case %d: %d\n", j + 1, a[j]); } return 0; }
#include <stdio.h> int main(int argc, char *argv[]) { int a[100000], i = 0; while (1) { scanf("%d", &a[i]); if (a[i] == 0) break; i++; } for (int j = 0; j < i; j++) { printf("Case %d: %d\n", j + 1, a[j]); } return 0; }
[["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13]]
1
95
#include <iostream> using namespace std; int main() { int a, cnt = 1; while (1) { cin >> a; if (a == 0) break; cout << "Case " << cnt << ": " << a << endl; } return 0; }
#include <iostream> using namespace std; int main() { int a, cnt = 1; while (1) { cin >> a; if (a == 0) break; cout << "Case " << cnt << ": " << a << endl; cnt++; } 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
56
#include <bits/stdc++.h> using namespace std; int main() { int x, csn = 1; while (cin >> x, x) { cin >> x; cout << "Case " << csn << ": " << x << endl; csn++; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int x, csn = 1; while (cin >> x, x) { cout << "Case " << csn << ": " << x << endl; csn++; } return 0; }
[["-", 0, 52, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 52, 8, 9, 0, 1, 0, 16, 17, 152], ["-", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]]
1
55
#include <iostream> using namespace std; int main() { int i, input; cin >> input; for (i = 1; input != 0; i++) { cout << "case " << i << ": " << input << endl; cin >> input; } }
#include <iostream> using namespace std; int main() { int i, input; cin >> input; for (i = 1; input != 0; i++) { cout << "Case " << i << ": " << input << endl; cin >> input; } }
[["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
56
#include <stdio.h> int x; int main() { int i = 1; while (1) { scanf("%d", &x); if (x == 0) break; printf("case %d: %d\n", i, x); i++; } return 0; }
#include <stdio.h> int x; int main() { int 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]]
1
58
#include <cstdlib> #include <cstring> #include <iostream> using namespace std; int main() { int i = 0, x; // int x[1000]; char buf[1000]; while (fgets(buf, sizeof(buf), stdin) != NULL) { buf[strlen(buf) - 1] = '\0'; x = atoi(buf); if (x == 0) break; cout << "Case " << i++ << ": " << x ...
#include <cstdlib> #include <cstring> #include <iostream> using namespace std; int main() { int i = 1, x; // int x[1000]; char buf[1000]; while (fgets(buf, sizeof(buf), stdin) != NULL) { buf[strlen(buf) - 1] = '\0'; x = atoi(buf); if (x == 0) break; cout << "Case " << i++ << ": " << x ...
[["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]]
1
101
#include <iostream> using namespace std; int main() { int x, i = 0; while (1) { cin >> x; if (!x) return 0; i++, cout << "Case :" << i << " " << x << endl; } }
#include <iostream> using namespace std; int main() { int x, i = 0; while (1) { cin >> x; if (!x) return 0; i++, 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], ["-", 12, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 12, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
56
#include <iostream> using namespace std; int main() { int a = 1, i = 1; while (true) { cin >> a; if (a == 0) return 0; cout << "Case " << i << ": " << a << endl; } }
#include <iostream> using namespace std; int main() { int a = 1, i = 1; while (true) { cin >> a; if (a == 0) return 0; cout << "Case " << i << ": " << a << endl; i++; } }
[["+", 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
56
#include <iostream> using namespace std; int main() { int x; int i = 1; while (cin >> x && x) cout << "Case " << i++ << " :" << x << endl; }
#include <iostream> using namespace std; int main() { int x; int i = 1; while (cin >> x && x) cout << "Case " << i++ << ": " << x << endl; }
[["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
45
#include <stdio.h> int main(void) { int i; for (i = 0;; ++i) { int x; scanf("%d", &x); if (x == 0) { break; } printf("Case %d: %d\n", i, x); } return 0; }
#include <stdio.h> int main(void) { int i; for (i = 0;; ++i) { int x; scanf("%d", &x); if (x == 0) { break; } printf("Case %d: %d\n", i + 1, x); } return 0; }
[["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
1
62
#include <iostream> using namespace std; int main() { for (int i = 1, x; cin >> x && x != 0; i++) { cin >> x; cout << "Case " << i << ": " << x << endl; } }
#include <iostream> using namespace std; int main() { for (int i = 1, x; cin >> x && x != 0; i++) { cout << "Case " << i << ": " << x << endl; } }
[["-", 0, 7, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 7, 8, 9, 0, 1, 0, 16, 17, 152], ["-", 0, 7, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 8, 9, 0, 7, 8, 9, 0, 1, 0, 35]]
1
54
#include <stdio.h> int main(void) { int x, i = 1; while (1) { scanf("%d", &x); if (x == 0) break; else printf("case %d: %d\n", i, x); i++; } return 0; }
#include <stdio.h> int main(void) { int x, i = 1; while (1) { scanf("%d", &x); if (x == 0) break; else 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]]
1
59
#include <cstdio> int main() { int a[100]; int i; for (i = 1; i < 100; i++) { scanf("%d", &a[i]); if (a[i] == 0) break; printf("case %d: %d\n", i, a[i]); } return 0; }
#include <cstdio> int main() { int a[50000]; int i; for (i = 1; i < 50000; i++) { scanf("%d", &a[i]); if (a[i] == 0) break; printf("Case %d: %d\n", i, a[i]); } return 0; }
[["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
74
#include <stdio.h> int main() { int a, n = 1; while (1) { scanf("%d", &a); if (a == 0) { break; } else { printf("Case %d:%d\n", n, a); n++; } } return 0; }
#include <stdio.h> int main() { int a, n = 1; while (1) { scanf("%d", &a); if (a == 0) { break; } else { printf("Case %d: %d\n", n, a); n++; } } 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 <stdio.h> int main() { int no = 0, x, kei; int n[10000]; while (1) { scanf("%d", &x); if (x == 0) break; no = no + 1; n[no] = x; } for (kei = 1; kei <= no; kei++) { printf("Case %d:%d\n", kei, n[kei]); } return 0; }
#include <stdio.h> int main() { int no = 0, x, kei; int n[10000]; while (1) { scanf("%d", &x); if (x == 0) break; no = no + 1; n[no] = x; } for (kei = 1; kei <= no; kei++) { printf("Case %d: %d\n", kei, n[kei]); } return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
93
#include <stdio.h> int main(void) { int i, j = 0; int a; for (i = 1; j; i++) { scanf("%d", &a); if (a == 0) j = 1; if (a != 0) printf("Case %d: %d\n", i, a); } return 0; }
#include <stdio.h> int main(void) { int i, j = 0; int a; for (i = 1; j < 1; i++) { scanf("%d", &a); if (a == 0) j = 1; if (a != 0) printf("Case %d: %d\n", i, a); } return 0; }
[["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]]
1
73
#include <iostream> #include <vector> using namespace std; int main(int argc, char *argv[]) { int x; vector<int> nums; while (cin >> x) { if (x == 0) break; nums.push_back(x); } for (int i = 0; i < nums.size(); i++) cout << "Case " << i << ": " << nums[i] << endl; return 0; }
#include <iostream> #include <vector> using namespace std; int main(int argc, char *argv[]) { int x; vector<int> nums; while (cin >> x) { if (x == 0) break; nums.push_back(x); } for (int i = 0; i < nums.size(); i++) cout << "Case " << i + 1 << ": " << nums[i] << endl; return 0; }
[["+", 31, 16, 31, 16, 31, 16, 12, 16, 17, 72], ["+", 31, 16, 31, 16, 31, 16, 12, 16, 12, 13]]
1
94
#include <stdio.h> int main(void) { int no, i = 1; scanf("%d", &no); while (no != 0) { printf("Case %d: %d", i++, no); scanf("%d", &no); } return 0; }
#include <stdio.h> int main(void) { int no, i = 1; scanf("%d", &no); while (no != 0) { printf("Case %d: %d\n", i++, no); scanf("%d", &no); } return 0; }
[["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
1
59
#include <iostream> using namespace std; int main(void) { int in, c = 1; while (cin >> in, !cin.eof()) { cout << "Case " << c << ": " << in << endl; c++; } return 0; }
#include <iostream> using namespace std; int main(void) { int in, c = 1; while (cin >> in, in) { cout << "Case " << c << ": " << in << endl; c++; } return 0; }
[["-", 0, 52, 15, 339, 51, 34, 12, 91, 17, 111], ["-", 51, 34, 12, 91, 28, 2, 63, 118, 28, 22], ["-", 51, 34, 12, 91, 28, 2, 63, 118, 17, 131], ["-", 51, 34, 12, 91, 28, 2, 63, 118, 119, 120], ["-", 51, 34, 12, 91, 28, 2, 3, 4, 0, 24], ["-", 51, 34, 12, 91, 28, 2, 3, 4, 0, 25], ["+", 8, 9, 0, 52, 15, 339, 51, 34, 12, 2...
1
57
#include <iostream> int main() { int cnt = 1; while (true) { int i; std::cin >> i; if (i == 0) break; std::cout << "case " << cnt << ": " << i << std::endl; cnt++; } return 0; }
#include <iostream> #include <vector> int main() { int cnt = 1; while (true) { int i; std::cin >> i; if (i == 0) break; std::cout << "Case " << cnt << ": " << i << std::endl; cnt++; } return 0; }
[["+", 36, 36, 36, 36, 0, 30, 0, 135, 0, 138], ["+", 36, 36, 36, 36, 0, 30, 0, 135, 136, 137], ["-", 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 num, i; for (i = 1;; i++) { scanf("%d", num); if (num == 0) break; printf("Case %d: %d\n", i, num); } return 0; }
#include <stdio.h> int main() { int num, i; for (i = 1;; i++) { scanf("%d", &num); if (num == 0) break; printf("Case %d: %d\n", i, num); } return 0; }
[["+", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67]]
1
57
#include <iostream> #include <vector> using namespace std; int main() { vector<string> a; string s; int count = 1; while (cin >> s) { if (s == "0") { break; } a.push_back(s); } for (int i = 0; i < a.size(); i++) { cout << "Case" << " " << i + 1 << " " << a[i] << endl; } ...
#include <iostream> #include <vector> using namespace std; int main() { vector<string> a; string s; int count = 1; while (cin >> s) { if (s == "0") { break; } a.push_back(s); } for (int i = 0; i < a.size(); i++) { cout << "Case" << " " << i + 1 << ": " << a[i] << endl; } ...
[["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
103
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <string> #include <vector> using namespace std; int main() { int x; for (int i = 0; true; i++) { cin >> x; if (!x) break; printf("Case %d: %d\n", i, x); } return 0; }
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <string> #include <vector> using namespace std; int main() { int x; for (int i = 1; true; i++) { cin >> x; if (!x) break; printf("Case %d: %d\n", i, x); } return 0; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
65
#include <stdio.h> int main() { int i = 1; int x; while (1) { scanf("%d", &x); if (x == 0) { break; } printf("Case %d: %d", i, x); i++; } return 0; }
#include <stdio.h> int main() { int i = 1; int x; 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, 44]]
1
59
#include <iostream> using namespace std; int main() { int x = 0; int count = 0; while (1) { cin >> x; if (x == 0) { break; } count++; cout << "case " << count << ": " << x << endl; } return 0; }
#include <iostream> using namespace std; int main() { int x = 0; int count = 0; while (1) { cin >> x; if (x == 0) { break; } count++; cout << "Case " << count << ": " << 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
64
#include <iostream> #include <vector> using namespace std; int main(void) { int num = 0, t = 0; vector<int> arr; do { cin >> num; if (num != 0) arr.push_back(num); } while (num != 0); vector<int>::iterator it = arr.begin(); for (it = arr.begin(); it != arr.end(); it++) { cout << "Case ...
#include <iostream> #include <vector> using namespace std; int main(void) { int num = 0, t = 1; vector<int> arr; do { cin >> num; if (num != 0) arr.push_back(num); } while (num != 0); vector<int>::iterator it = arr.begin(); for (it = arr.begin(); it != arr.end(); it++) { cout << "Case ...
[["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]]
1
117
#include <iostream> using namespace std; int main() { int x, i = 0; while (1) { cin >> x; i += 1; 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 += 1; 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
62
#include <algorithm> #include <cstdlib> #include <iostream> #include <sstream> #include <string> #include <vector> using namespace std; template <class T> int streamvar(std::istream &in, T &var) { if (!in) { cerr << "invalid istream" << endl; return 1; } in >> var; if (in.fail()) { cerr << "no var"...
#include <algorithm> #include <cstdlib> #include <iostream> #include <sstream> #include <string> #include <vector> using namespace std; template <class T> int streamvar(std::istream &in, T &var) { if (!in) { cerr << "invalid istream" << endl; return 1; } in >> var; if (in.fail()) { cerr << "no var"...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 12, 22]]
1
244
#include <stdio.h> int main(void) { int x, i = 0; while (1) { scanf("%d", &x); if (x == 0) break; i++; printf("case %d:%d\n", i, x); } return 0; }
#include <stdio.h> int main(void) { int x, i = 0; while (1) { scanf("%d", &x); if (x == 0) break; i++; printf("Case %d: %d\n", i, x); } return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
58
#include "iostream" using namespace std; int main() { int num; int i = 1; while (1) { cin >> num; if (num != 0) { cout << "Case" << i << ": " << num << endl; i++; } else { break; } } }
#include "iostream" using namespace std; int main() { int num; int i = 1; while (1) { cin >> num; if (num != 0) { cout << "Case " << i << ": " << num << endl; i++; } else { break; } } }
[["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
64
#include <iostream> #include <vector> using namespace std; int main() { int n; vector<int> num; while (cin >> n && n != 0) { num.push_back(n); } vector<int>::iterator it = num.begin(); for (int i = 1; it != num.end(); i++, it++) { cout << "case " << i << ": " << *it << "\n"; } return 0; }
#include <iostream> #include <vector> using namespace std; int main() { int n; vector<int> num; while (cin >> n && n != 0) { num.push_back(n); } vector<int>::iterator it = num.begin(); for (int i = 1; it != num.end(); i++, it++) { cout << "Case " << i << ": " << *it << "\n"; } return 0; }
[["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
101
#include <iostream> using namespace std; int main(void) { int x, i = 1; while (1) { cin >> x; if (x == 0) break; cout << "case " << i << ": " << x << endl; i++; } }
#include <iostream> using namespace std; int main(void) { int x, i = 1; while (1) { cin >> x; if (x == 0) break; cout << "Case " << i << ": " << x << endl; i++; } }
[["-", 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 main() { int count = 1, num; while (cin >> num) if (num) cout << "Case " << count << ": " << num << endl; return 0; }
#include <iostream> using namespace std; int main() { int count = 1, num; while (cin >> num) if (num) cout << "Case " << count++ << ": " << num << endl; return 0; }
[["+", 31, 16, 31, 16, 31, 16, 12, 27, 17, 29]]
1
48
#include <iostream> int main() { int x; std::cin >> x; for (int i = 1; x != 0; i++) { std::cout << "case" << ' ' << i << ' ' << x << std::endl; std::cin >> x; } }
#include <iostream> int main() { int x; std::cin >> x; for (int i = 1; x != 0; i++) { std::cout << "Case" << ' ' << i << ": " << x << std::endl; std::cin >> x; } }
[["-", 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, 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
63
#include <stdio.h> int main(void) { int i = 1, x; scanf("%d", &x); while (x != 0) { printf("Case %d: %d", i, x); i++; scanf("%d", &x); } return 0; }
#include <stdio.h> int main(void) { int i = 1, x; scanf("%d", &x); while (x != 0) { printf("Case %d: %d\n", i, x); i++; scanf("%d", &x); } return 0; }
[["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
1
61
#include <algorithm> #include <bitset> #include <cfloat> #include <climits> #include <cmath> #include <cstdio> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <s...
#include <algorithm> #include <bitset> #include <cfloat> #include <climits> #include <cmath> #include <cstdio> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <s...
[["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
99
#include <iostream> using namespace std; int main() { int x; int i = 0; while (1) { i++; cin >> x; if (x == 0) break; cout << "Case " << i << ":" << x << endl; } }
#include <iostream> using namespace std; int main() { int x; int i = 0; while (1) { i++; cin >> x; if (x == 0) break; cout << "Case " << i << ": " << x << endl; } }
[["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
57
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #define mp...
#include <algorithm> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #define mp...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
200
#include <iostream> #include <vector> using namespace std; int main(void) { int input; vector<int> arr; while (cin >> input, input != 0) { arr.push_back(input); } input = 0; vector<int>::iterator it = arr.begin(); while (it != arr.end()) { input++; cout << "case " << input << ": " << *it <<...
#include <iostream> #include <vector> using namespace std; int main(void) { int input; vector<int> arr; while (cin >> input, input != 0) { arr.push_back(input); } input = 0; vector<int>::iterator it = arr.begin(); while (it != arr.end()) { input++; cout << "Case " << input << ": " << *it << ...
[["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
99
#include <iostream> using namespace std; int main() { int i, j = 1; cin >> i; while (i != 0) { cout << "Case" << j << ":" << i << endl; j += 1; cin >> i; } return 0; }
#include <iostream> using namespace std; int main() { int i, j = 1; cin >> i; while (i != 0) { cout << "Case " << j << ": " << i << endl; j += 1; cin >> 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
58