problem_id stringlengths 6 6 | buggy_code stringlengths 8 526k | fixed_code stringlengths 12 526k | labels listlengths 0 15 ⌀ | buggy_submission_id int64 1 1.54M | fixed_submission_id int64 2 1.54M | user_id stringlengths 10 10 | language stringclasses 8
values |
|---|---|---|---|---|---|---|---|
p00001 | #include <algorithm>
#include <stdio.h>
using namespace std;
int main() {
const int N = 10;
int height[N];
for (int i = 0; i < 10; i++) {
scanf("%d", &height[i]);
}
sort(height, height + N);
reverse(height, height + N);
for (int j = 0; j < 3; j++) {
printf("%d", height[j]);
}
return 0;
} | #include <algorithm>
#include <stdio.h>
using namespace std;
int main() {
const int N = 10;
int height[N];
for (int i = 0; i < 10; i++) {
scanf("%d", &height[i]);
}
sort(height, height + N);
reverse(height, height + N);
for (int j = 0; j < 3; j++) {
printf("%d\n", height[j]);
}
return 0;
} | [
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add"
] | 4,511 | 4,510 | u461301234 | cpp |
p00001 | #include <climits>
#include <iostream>
#include <utility>
using namespace std;
int main() {
int height[10] = {};
for (int i = 0; i < 10; i++) {
cin >> height[i];
}
int f = INT_MIN, s = INT_MIN, t = INT_MIN;
for (int i = 0; i < 9; i++) {
if (height[i] >= t) {
t = height[i];
}
if (t >... | #include <climits>
#include <iostream>
#include <utility>
using namespace std;
int main() {
int height[10] = {};
for (int i = 0; i < 10; i++) {
cin >> height[i];
}
int f = INT_MIN, s = INT_MIN, t = INT_MIN;
for (int i = 0; i < 10; i++) {
if (height[i] >= t) {
t = height[i];
}
if (t ... | [
"literal.number.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 4,519 | 4,520 | u862519367 | cpp |
p00001 | #include <iostream>
using namespace std;
int main() {
int height[10], i, a = 0, b = 0, c = 0;
for (i = 0; i < 10; i++) {
cin >> height[i];
}
for (i = 0; i < 10; i++) {
if (height[i] >= a) {
b = a;
a = height[i];
} else if (height[i] >= b) {
c = b;
b = height[i];
} else if... | #include <iostream>
using namespace std;
int main() {
int height[10], i, a = 0, b = 0, c = 0;
for (i = 0; i < 10; i++) {
cin >> height[i];
}
for (i = 0; i < 10; i++) {
if (height[i] >= a) {
c = b;
b = a;
a = height[i];
} else if (height[i] >= b) {
c = b;
b = height[i];
... | [
"assignment.add"
] | 4,521 | 4,522 | u256874901 | cpp |
p00001 | #include <iostream>
using namespace std;
int main() {
int a[100];
int list[4] = {0, 0, 0, 0};
for (int i = 1; i < 10; i++) {
cin >> a[i];
if (list[1] < a[i]) {
list[3] = list[2];
list[2] = list[1];
list[1] = a[i];
}
else if (list[2] < a[i]) {
list[3] = list[2];
... | #include <iostream>
using namespace std;
int main() {
int a[100];
int list[4] = {0, 0, 0, 0};
for (int i = 1; i <= 10; i++) {
cin >> a[i];
if (list[1] < a[i]) {
list[3] = list[2];
list[2] = list[1];
list[1] = a[i];
}
else if (list[2] < a[i]) {
list[3] = list[2];
... | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 4,523 | 4,524 | u852311840 | cpp |
p00001 | #include <iostream>
using namespace std;
int main(int argc, char *argv[]) {
int h1 = 0, h2 = 0, h3 = 0, h;
for (int i = 1; i < 10; i++) {
cin >> h;
if (h > h3) {
h3 = h;
if (h3 > h2) {
swap(h3, h2);
if (h2 > h1) {
swap(h2, h1);
}
}
}
}
cout << h1 ... | #include <iostream>
using namespace std;
int main(int argc, char *argv[]) {
int h1 = 0, h2 = 0, h3 = 0, h;
for (int i = 1; i < 11; i++) {
cin >> h;
if (h > h3) {
h3 = h;
if (h3 > h2) {
swap(h3, h2);
if (h2 > h1) {
swap(h2, h1);
}
}
}
}
cout << h1 ... | [
"literal.number.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 4,525 | 4,526 | u379871710 | cpp |
p00002 | #include <cstdio>
using namespace std;
int main() {
int a, b;
while (scanf("%d", &a) != EOF) {
scanf("%d", &b);
int total = a + b, ans = 1;
while ((total / 1) > 10) {
total /= 10;
++ans;
}
printf("%d\n", ans);
}
return 0;
} | #include <cstdio>
using namespace std;
int main() {
int a, b;
while (scanf("%d", &a) != EOF) {
scanf("%d", &b);
int total = a + b, ans = 1;
while ((total / 1) >= 10) {
total /= 10;
++ans;
}
printf("%d\n", ans);
}
return 0;
} | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 5,385 | 5,386 | u472197678 | cpp |
p00002 | #include <iostream>
using namespace std;
int main() {
long long int a, b;
cin >> a >> b;
long long int sum = a + b;
// cout << sum << endl;
int cnt = 1;
while (sum /= 10)
cnt++;
cout << cnt << endl;
} | #include <iostream>
using namespace std;
int main() {
long long int a, b;
while (cin >> a >> b) {
long long int sum = a + b;
// cout << sum << endl;
int cnt = 1;
while (sum /= 10)
cnt++;
cout << cnt << endl;
}
} | [] | 5,391 | 5,392 | u609647473 | cpp |
p00002 | #include <iostream>
using namespace std;
int main(void) {
int a, b;
cin >> a >> b;
for (a += b, b = 0; a > 0; b++, a /= 10)
;
cout << b << endl;
} | #include <iostream>
using namespace std;
int main(void) {
int a, b;
while (cin >> a >> b) {
for (a += b, b = 0; a > 0; b++, a /= 10)
;
cout << b << endl;
}
} | [] | 5,394 | 5,395 | u615353970 | cpp |
p00002 | #include <algorithm>
#include <iostream>
#include <math.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b;
c = a + b;
int ret = 1;
for (int i = 1;; i++) {
if (c / pow(10, i) >= 1) {
ret++;
} else {
break;
}
}
cout << ret << endl;
return 0;
} | #include <algorithm>
#include <iostream>
#include <math.h>
using namespace std;
int main() {
int a, b, c;
while (cin >> a >> b) {
c = a + b;
int ret = 1;
for (int i = 1;; i++) {
if (c / pow(10, i) >= 1) {
ret++;
} else {
break;
}
}
cout << ret << endl;
}
re... | [] | 5,400 | 5,401 | u373988530 | cpp |
p00002 | #include <cstdio>
#include <string>
int main() {
int a, b;
scanf("%d %d", &a, &b);
printf("%ld\n", std::to_string(a + b).size());
} | #include <cstdio>
#include <string>
int main() {
int a, b;
while (~scanf("%d %d", &a, &b))
printf("%ld\n", std::to_string(a + b).size());
} | [] | 5,405 | 5,406 | u101181393 | cpp |
p00002 | #include <iostream>
using namespace std;
int main() {
int a, b, x = 1, count = 0;
while (cin >> a >> b, !cin.eof()) {
x = 1;
count = 0;
while (a + b > x) {
x *= 10;
count++;
}
cout << count << endl;
}
} | #include <iostream>
using namespace std;
int main() {
int a, b, x = 1, count = 0;
while (cin >> a >> b, !cin.eof()) {
x = 1;
count = 0;
while (a + b >= x) {
x *= 10;
count++;
}
cout << count << endl;
}
} | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 5,407 | 5,408 | u017200929 | cpp |
p00002 | #include <iostream>
#include <string>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
string s(to_string(a + b));
cout << s.size() << endl;
return 0;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
string s(to_string(a + b));
cout << s.size() << endl;
}
return 0;
} | [] | 5,409 | 5,410 | u116384554 | cpp |
p00002 | #include <stdio.h>
int main() {
long a, b;
while (scanf("%d %d", &a, &b) != -1) {
a += b;
b = 0;
while (a > 0) {
a /= 10;
b++;
}
printf("%d\n", b);
}
return 0;
} | #include <stdio.h>
int main() {
int a, b;
while (scanf("%d %d", &a, &b) != -1) {
a += b;
b = 0;
while (a > 0) {
a /= 10;
b++;
}
printf("%d\n", b);
}
return 0;
} | [
"variable_declaration.type.primitive.change"
] | 5,411 | 5,412 | u129680743 | cpp |
p00002 | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <iterator>
#include <math.h>
#include <queue>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
#define rep(I, N) for (int I = 0; I < (int)(N); I++)
#define FIN(V) cout << V << endl
#define pb push_back
#def... | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <iterator>
#include <math.h>
#include <queue>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
#define rep(I, N) for (int I = 0; I < (int)(N); I++)
#define FIN(V) cout << V << endl
#define pb push_back
#def... | [
"identifier.change",
"expression.operation.binary.change"
] | 5,417 | 5,418 | u092829549 | cpp |
p00002 | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <iterator>
#include <math.h>
#include <queue>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
#define rep(I, N) for (int I = 0; I < (int)(N); I++)
#define FIN(V) cout << V << endl
#define pb push_back
#def... | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <iterator>
#include <math.h>
#include <queue>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
#define rep(I, N) for (int I = 0; I < (int)(N); I++)
#define FIN(V) cout << V << endl
#define pb push_back
#def... | [
"identifier.change",
"expression.operation.binary.change",
"expression.operation.binary.remove"
] | 5,419 | 5,418 | u092829549 | cpp |
p00002 | #define _USE_MATH_DEFINES
#include <algorithm>
#include <functional>
#include <iostream>
#include <math.h>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
//??°?????????????????°
void function() {
//??¢??°
}
int main() {
int a, b;
cin >> a >> b;
... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <functional>
#include <iostream>
#include <math.h>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
//??°?????????????????°
void function() {
//??¢??°
}
int main() {
int a, b;
while (cin >> a... | [] | 5,422 | 5,423 | u484092586 | cpp |
p00002 | #include <iostream>
using namespace std;
int main() {
int i;
int a, b, sum, figure;
cin >> a >> b;
sum = a + b;
figure = 1;
while (sum / 10 != 0) {
sum = sum / 10;
figure++;
}
cout << figure << "\n";
return 0;
} | #include <iostream>
using namespace std;
int main() {
int i;
int a, b, sum, figure;
while (cin >> a >> b) {
sum = a + b;
figure = 1;
while (sum / 10 != 0) {
sum = sum / 10;
figure++;
}
cout << figure << "\n";
}
return 0;
} | [] | 5,427 | 5,428 | u002433243 | cpp |
p00002 | #include <iostream>
#include <string>
using namespace std;
int main() {
int a[2], b, c = 1;
;
while (cin >> a[0] >> a[1]) {
b = a[0] + a[1];
while (b >= 10) {
b = b / 10;
c++;
}
cout << c << endl;
}
} | #include <iostream>
#include <string>
using namespace std;
int main() {
int a[2], b, c = 1;
;
while (cin >> a[0] >> a[1]) {
b = a[0] + a[1];
while (b >= 10) {
b = b / 10;
c++;
}
cout << c << endl;
c = 1;
}
} | [
"assignment.add"
] | 5,430 | 5,431 | u071380842 | cpp |
p00002 | #include <iostream>
using namespace std;
int main() {
int a;
int b;
int c;
int n;
int d;
while (cin >> a >> b) {
c = a + b;
d = 1;
n = 0;
while (1) {
if (d < c) {
break;
}
d = d * 10;
n = n + 1;
}
cout << n << endl;
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
int a;
int b;
int c;
int n;
int d;
while (cin >> a >> b) {
c = a + b;
d = 1;
n = 0;
while (1) {
if (d > c) {
break;
}
d = d * 10;
n = n + 1;
}
cout << n << endl;
}
return 0;
} | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 5,434 | 5,435 | u012061892 | cpp |
p00002 | #include <algorithm>
#include <iostream>
#include <vector>
#define rep(x, to) for (x = 0; x < to; x++)
#define rep2(x, from, to) for (x = from; x < to; x++)
using namespace std;
int main(void) {
int a, b, c;
cin >> a >> b;
c = a + b;
int k = 0;
while (c > 0) {
k++;
c /= 10;
}
if (k == 0)
... | #include <algorithm>
#include <iostream>
#include <vector>
#define rep(x, to) for (x = 0; x < to; x++)
#define rep2(x, from, to) for (x = from; x < to; x++)
using namespace std;
int main(void) {
int a, b, c;
while (cin >> a >> b) {
c = a + b;
int k = 0;
while (c > 0) {
k++;
c /= 10;
... | [] | 5,436 | 5,437 | u233239546 | cpp |
p00002 | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int a, b, c;
char str[16];
cin >> a >> b;
c = sprintf(str, "%d", a + b);
cout << c << endl;
return 0;
} | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int a, b, c;
char str[16];
while (cin >> a >> b) {
c = sprintf(str, "%d", a + b);
cout << c << endl;
}
return 0;
} | [] | 5,438 | 5,439 | u941914960 | cpp |
p00002 | #include <iostream>
int main() {
int a, b;
std::cin >> a >> b;
int sum = a + b;
int i = 0;
do {
sum /= 10;
i++;
} while (sum > 0);
std::cout << i << std::endl;
return 0;
} | #include <iostream>
int main() {
int a, b;
while (std::cin >> a >> b) {
int sum = a + b;
int i = 0;
do {
sum /= 10;
i++;
} while (sum > 0);
std::cout << i << std::endl;
}
return 0;
} | [] | 5,440 | 5,441 | u664139581 | cpp |
p00002 | #include <iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
int d, sum = 0;
sum = a + b;
for (d = 1; sum >= 10; ++d) {
sum /= 10;
}
if (sum)
cout << endl;
else
cout << 0 << endl;
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
int d, sum = 0;
sum = a + b;
for (d = 1; sum >= 10; ++d) {
sum /= 10;
}
if (sum)
cout << d << endl;
else
cout << 0 << endl;
}
return 0;
} | [
"io.output.change"
] | 5,442 | 5,443 | u646183247 | cpp |
p00002 | #include <iostream>
#include <sstream>
#include <string>
using namespace std;
int main() {
int a, b, n;
cin >> a >> b;
n = a + b;
int ans = 1;
while (n >= 10) {
n /= 10;
ans++;
}
cout << ans << endl;
return 0;
} | #include <iostream>
#include <sstream>
#include <string>
using namespace std;
int main() {
int a, b, n;
while (cin >> a >> b) {
n = a + b;
int ans = 1;
while (n >= 10) {
n /= 10;
ans++;
}
cout << ans << endl;
}
return 0;
} | [] | 5,444 | 5,445 | u864932042 | cpp |
p00002 | #include <cmath>
#include <cstdio>
using namespace std;
int main() {
int a, b, c;
while (scanf("%d %d", &a, &b) != EOF) {
c = (int)log10(a + b);
printf("%d\n", c);
}
return 0;
} | #include <cmath>
#include <cstdio>
using namespace std;
int main() {
int a, b, c;
while (scanf("%d %d", &a, &b) != EOF) {
c = (int)log10(a + b) + 1;
printf("%d\n", c);
}
return 0;
} | [
"assignment.change"
] | 5,446 | 5,447 | u946229723 | cpp |
p00002 | #include <iostream>
using namespace std;
int main() {
int a, b, c, i;
for (int j = 0; j < 200; j++) {
if (cin >> a >> b)
break;
c = a + b;
for (i = 1; true; i++) {
c = c / 10;
if (c == 0)
break;
}
cout << i << endl;
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
int a, b, c, i;
for (int j = 0; j < 200; j++) {
if (!(cin >> a >> b))
break;
c = a + b;
for (i = 1; true; i++) {
c = c / 10;
if (c == 0)
break;
}
cout << i << endl;
}
return 0;
} | [
"control_flow.branch.if.condition.change"
] | 5,450 | 5,451 | u307128633 | cpp |
p00002 | #include <iostream>
int main(void) {
int array[2];
std::cin >> array[0] >> array[1];
array[0] += array[1];
array[1] = 0;
do {
array[0] /= 10;
++array[1];
} while (array[0]);
std::cout << array[1] << std::endl;
return 0;
} | #include <iostream>
int main(void) {
int array[2];
while (std::cin >> array[0] >> array[1]) {
array[0] += array[1];
array[1] = 0;
do {
array[0] /= 10;
++array[1];
} while (array[0]);
std::cout << array[1] << std::endl;
}
return 0;
} | [] | 5,454 | 5,455 | u403446452 | cpp |
p00002 | #include <iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
a = a + b;
b = 0;
while (a > 1) {
a /= 10;
b++;
}
cout << b << endl;
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
a = a + b;
b = 1;
while (a >= 10) {
a /= 10;
b++;
}
cout << b << endl;
}
return 0;
} | [
"literal.number.change",
"assignment.value.change"
] | 5,458 | 5,459 | u301021544 | cpp |
p00002 | #include <iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
a = a + b;
b = 1;
while (a > 1) {
a /= 10;
b++;
}
cout << b << endl;
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
a = a + b;
b = 1;
while (a >= 10) {
a /= 10;
b++;
}
cout << b << endl;
}
return 0;
} | [] | 5,460 | 5,459 | u301021544 | cpp |
p00002 | #include <iostream>
#include <math.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
int c = log10((double)a + b) + 1;
cout << c << endl;
return (0);
} | #include <iostream>
#include <math.h>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
int c = log10((double)a + b) + 1;
cout << c << endl;
}
return (0);
} | [] | 5,467 | 5,468 | u552422656 | cpp |
p00002 | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int main(void) {
int a, b, c;
char dummy[8];
cin >> a >> b;
if (cin.eof())
return 0;
c = a + b;
cout << sprintf(dummy, "%d", c) << endl;
return 0;
} | #include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int main(void) {
int a, b, c;
char dummy[8];
while (1) {
cin >> a >> b;
if (cin.eof())
return 0;
c = a + b;
cout << sprintf(dummy, "%d", c) << endl;
}
return 0;
} | [] | 5,469 | 5,470 | u228816757 | cpp |
p00002 | #include <iostream>
#include <math.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
cout << (int)log10(a + b) + 1 << endl;
return 0;
} | #include <iostream>
#include <math.h>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
cout << (int)log10(a + b) + 1 << endl;
}
return 0;
} | [] | 5,471 | 5,472 | u067467468 | cpp |
p00002 | #include <cstdio>
char s[9];
int main() {
for (int a, b; ~scanf("%d %d", a, b); printf("%d\n", sprintf(s, "%s", a + b)))
;
} | #include <cstdio>
char d[9];
int main() {
for (int a, b; ~scanf("%d %d", &a, &b);
printf("%d\n", sprintf(d, "%d", a + b)))
;
} | [
"identifier.change",
"variable_declaration.array_dimensions.change",
"expression.operation.unary.reference.add",
"call.arguments.change",
"io.output.change",
"literal.string.change"
] | 5,473 | 5,474 | u399045574 | cpp |
p00002 | #include <cstdio>
char s[9];
int main() {
for (int a, b; ~scanf("%d %d", a, b); printf("%d\n", sprintf(s, "%s", a + b)))
;
} | #include <cstdio>
char d[9];
int main() {
for (int a, b; ~scanf("%d%d", &a, &b);
printf("%d\n", sprintf(d, "%d", a + b)))
;
} | [
"identifier.change",
"variable_declaration.array_dimensions.change",
"literal.string.change",
"control_flow.loop.for.condition.change",
"call.arguments.change",
"expression.operation.unary.reference.add",
"io.output.change"
] | 5,473 | 5,475 | u399045574 | cpp |
p00002 | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <numeric>
#include <string>
#include <vector>
using namespace ::std;
int main(void) {
int a, b;
cin >> a >> b;
int ab = a + b;
char c_num[64];
sprintf(c_num, "%d", ab);
string s_num = (string)c_num;
cout << s_num.siz... | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <numeric>
#include <string>
#include <vector>
using namespace ::std;
int main(void) {
int a, b;
while (cin >> a >> b) {
int ab = a + b;
char c_num[64];
sprintf(c_num, "%d", ab);
string s_num = (string)c_num;
... | [] | 5,476 | 5,477 | u211409570 | cpp |
p00002 | #include <iostream>
#include <stdio.h>
int main() {
int cnt, a, b;
while (scanf("%d %d", &a, &b) != EOF) {
cnt = 0;
for (int i = 10;; i *= 10) {
if ((a + b) / i == 0) {
std::cout << cnt << '\n';
break;
}
cnt++;
}
}
return 0;
} | #include <iostream>
#include <stdio.h>
int main() {
int cnt, a, b;
while (scanf("%d %d", &a, &b) != EOF) {
cnt = 1;
for (int i = 10;; i *= 10) {
if ((a + b) / i == 0) {
std::cout << cnt << '\n';
break;
}
cnt++;
}
}
return 0;
} | [
"literal.number.change",
"assignment.value.change"
] | 5,480 | 5,481 | u595651980 | cpp |
p00002 | #include <iostream>
#include <math.h>
using namespace std;
int main() {
int a, b, c;
while (cin >> a >> b) {
c = a + b;
int d;
for (int i = 0; i < 8; i++) {
if (pow(10, i) <= c && c < pow(10, i + 1)) {
d = i + 1;
}
cout << d << endl;
}
}
return 0;
} | #include <iostream>
#include <math.h>
using namespace std;
int main() {
int a, b, c;
while (cin >> a >> b) {
c = a + b;
int d;
for (int i = 0; i < 8; i++) {
if (pow(10, i) <= c && c < pow(10, i + 1)) {
d = i + 1;
}
}
cout << d << endl;
}
return 0;
} | [] | 5,484 | 5,485 | u835414158 | cpp |
p00002 | #include <cmath>
#include <iostream>
using namespace std;
int main() {
int out[200];
int n, m;
int count = 0;
while (cin >> n >> m) {
for (int i = 0; i < 100; i++) {
if (pow(10.0, i) <= n + m) {
out[count] = i;
break;
}
}
count++;
}
for (int i = 0; i < count; i++) {
... | #include <cmath>
#include <iostream>
using namespace std;
int main() {
int out[200];
int n, m;
int count = 0;
while (cin >> n >> m) {
for (int i = 0; i < 100; i++) {
if (pow(10.0, i) > n + m) {
out[count] = i;
break;
}
}
count++;
}
for (int i = 0; i < count; i++) {
... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 5,490 | 5,491 | u343612457 | cpp |
p00002 | #include <iostream>
using namespace std;
int main() {
int i, j;
while (cin >> i >> j) {
int i = i + j;
int count;
while (i > 0) {
i = i / 10;
count++;
}
cout << count << endl;
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
int i, j;
while (cin >> i >> j) {
i += j;
int count = 0;
while (i > 0) {
i = i / 10;
count++;
}
cout << count << endl;
}
return 0;
} | [
"variable_declaration.remove",
"assignment.compound.arithmetic.replace.add",
"expression.operator.arithmetic.replace.remove",
"expression.operation.binary.change"
] | 5,492 | 5,493 | u032002131 | cpp |
p00002 | #include <iostream>
using namespace std;
int main() {
int i, j;
while (cin >> i >> j) {
i += j;
int count;
while (i > 0) {
i = i / 10;
count++;
}
cout << count << endl;
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
int i, j;
while (cin >> i >> j) {
i += j;
int count = 0;
while (i > 0) {
i = i / 10;
count++;
}
cout << count << endl;
}
return 0;
} | [
"variable_declaration.value.change"
] | 5,494 | 5,493 | u032002131 | cpp |
p00002 | #include <iostream>
using namespace std;
int main() {
int i, j;
while (cin >> i >> j) {
i += j;
int count;
while (i > 0) {
i = i / 10;
count++;
}
cout << count << endl;
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
int i, j;
while (cin >> i >> j) {
i += j;
int count = 0;
while (i > 0) {
i = i / 10;
count++;
}
cout << count << "\n";
}
return 0;
} | [
"io.output.change"
] | 5,494 | 5,495 | u032002131 | cpp |
p00002 | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
int x = 1;
int ans = 1;
while (x >= a + b) {
x = x * 10;
ans++;
}
printf("%d\n", ans);
}
return 0;
} | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
int x = 1;
int ans = 0;
while (x <= a + b) {
x = x * 10;
ans++;
}
printf("%d\n", ans);
}
return 0;
} | [
"literal.number.change",
"variable_declaration.value.change",
"misc.opposites",
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 5,498 | 5,499 | u000502998 | cpp |
p00002 | #include <cmath>
#include <iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
cout << log((double)a + b) - 1 << endl;
}
return 0;
} | #include <cmath>
#include <iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
cout << (int)log10((double)a + b) + 1 << endl;
}
return 0;
} | [
"io.output.change",
"misc.opposites",
"expression.operator.arithmetic.change"
] | 5,500 | 5,501 | u724725984 | cpp |
p00002 | #include <cmath>
#include <iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
cout << (int)(log((double)a + b) - 1) << endl;
}
return 0;
} | #include <cmath>
#include <iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
cout << (int)log10((double)a + b) + 1 << endl;
}
return 0;
} | [
"io.output.change",
"misc.opposites",
"expression.operator.arithmetic.change"
] | 5,502 | 5,501 | u724725984 | cpp |
p00002 | #include <cmath>
#include <iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
cout << floor(log((double)a + b) - 1) << endl;
}
return 0;
} | #include <cmath>
#include <iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
cout << (int)log10((double)a + b) + 1 << endl;
}
return 0;
} | [
"io.output.change",
"misc.opposites",
"expression.operator.arithmetic.change",
"call.arguments.change"
] | 5,503 | 5,501 | u724725984 | cpp |
p00002 | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main(void) {
int a[200], b;
int i = 0;
while (scanf("%d %d", &a[i], &b) != EOF) {
a[i] = a[i] + b;
i++;
}
for (int j = 0; j < i; j++) {
int n = 1;
int nCount = 0;
while (a[i] / n >= 1) {
n *= 10;
nCount++;
}
... | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main(void) {
int a[200], b;
int i = 0;
while (scanf("%d %d", &a[i], &b) != EOF) {
a[i] = a[i] + b;
i++;
}
for (int j = 0; j < i; j++) {
int n = 1;
int nCount = 0;
while (a[j] / n >= 1) {
n *= 10;
nCount++;
}
... | [
"identifier.change",
"variable_access.subscript.index.change",
"control_flow.loop.condition.change"
] | 5,504 | 5,505 | u834923246 | cpp |
p00002 | // c++11
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
long int x, y;
int ans;
vector<long int> vx, vy;
while (cin >> x >> y) {
vx.push_back(x);
vy.push_back(y);
}
for (int i = 0; i < vx.size(); i++) {
long int div = 1, sum = vx[i] + vy[i];
for ... | // c++11
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
long int x, y;
int ans;
vector<long int> vx, vy;
while (cin >> x >> y) {
vx.push_back(x);
vy.push_back(y);
}
for (int i = 0; i < vx.size(); i++) {
long int div = 1, sum = vx[i] + vy[i];
for ... | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one",
"expression.operator.arithmetic.change",
"control_flow.branch.if.condition.change"
] | 5,533 | 5,534 | u601490092 | cpp |
p00002 | #include <cmath>
#include <iostream>
int main() {
int a, b;
while (std::cin >> a >> b)
std::cout << log10(a + b) << std::endl;
return 0;
} | #include <cmath>
#include <iostream>
int main() {
int a, b;
while (std::cin >> a >> b)
std::cout << trunc(log10(a + b)) + 1 << std::endl;
return 0;
} | [
"call.add",
"expression.operation.binary.add"
] | 5,537 | 5,538 | u875047112 | cpp |
p00002 | #include <iostream>
using namespace std;
int main() {
int a, b, i, ans, sum = 0;
while (cin >> a >> b) {
ans = a + b;
for (i = 0; ans > 0; i++) {
ans = ans / 10;
sum = sum + 1;
}
cout << sum << endl;
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
long long a, b, i, ans, sum = 0;
while (cin >> a >> b) {
ans = a + b;
for (i = 0; ans > 0; i++) {
ans = ans / 10;
sum = sum + 1;
}
cout << sum << endl;
sum = 0;
}
return 0;
} | [
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change",
"assignment.add"
] | 5,541 | 5,542 | u512111598 | cpp |
p00002 | #include <bits/stdc++.h>
using namespace std;
int a, b;
int main() {
while (scanf("%d %d", &a, &b) != EOF) {
int i;
a = a + b;
while (a > 0) {
a = a / 10;
++i;
}
cout << i << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int a, b;
int main() {
while (scanf("%d %d", &a, &b) != EOF) {
int i = 0;
a = a + b;
while (a > 0) {
a = a / 10;
++i;
}
cout << i << endl;
}
} | [
"variable_declaration.value.change"
] | 5,543 | 5,544 | u360619855 | cpp |
p00002 | #include <iostream>
#include <string>
using namespace std;
int main() {
string ans;
int a, b;
cin >> a >> b;
cout << to_string(a + b).length() << endl;
}
| #include <iostream>
#include <string>
using namespace std;
int main() {
string ans;
int a, b;
while (cin >> a >> b) {
cout << to_string(a + b).length() << endl;
}
}
| [] | 5,545 | 5,546 | u464296040 | cpp |
p00002 | #include "bits/stdc++.h"
using namespace std;
int main() {
int a, b;
cin >> a >> b;
int n = a + b;
int ans = 0;
while (n > 0) {
n /= 10;
ans++;
}
if (ans == 0)
ans++;
cout << ans << endl;
return 0;
} | #include "bits/stdc++.h"
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
int n = a + b;
int ans = 0;
while (n > 0) {
n /= 10;
ans++;
}
if (ans == 0)
ans++;
cout << ans << endl;
}
return 0;
} | [] | 5,547 | 5,548 | u321462250 | cpp |
p00002 | #include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int main() {
int a, b, c;
char ans[100];
cin >> a >> b;
sprintf(ans, "%d", a + b);
c = strlen(ans);
cout << c << endl;
return 0;
} | #include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int main() {
int a, b, c;
char ans[100];
while (cin >> a >> b) {
sprintf(ans, "%d", a + b);
c = strlen(ans);
cout << c << endl;
}
return 0;
} | [] | 5,549 | 5,550 | u721001324 | cpp |
p00002 | #include <iostream>
#include <sstream>
using namespace std;
int main() {
int a, b;
stringstream ss;
while (cin >> a >> b) {
ss << a + b;
cout << ss.str().size() << endl;
}
return 0;
} | #include <iostream>
#include <sstream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
stringstream ss;
ss << a + b;
cout << ss.str().size() << endl;
}
return 0;
} | [
"variable_declaration.remove",
"variable_declaration.add"
] | 5,562 | 5,563 | u546285759 | cpp |
p00002 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
using namespace std;
const int M = 100000;
const double pi = 3.141592653589;
int main() {
int a, b;
cin >> a >> b;
a = a + b;
int count = 0;
while (a > 0) {
a /= 10;
count++;
}
printf("%d\n", count);
} | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
using namespace std;
const int M = 100000;
const double pi = 3.141592653589;
int main() {
int a, b;
while (cin >> a >> b) {
a = a + b;
int count = 0;
while (a > 0) {
a /= 10;
count++;
}
pr... | [] | 5,564 | 5,565 | u872907517 | cpp |
p00002 | #include <iostream>
#include <vector>
#ifndef EOF
#define EOF (-1)
#endif
int main() {
std::vector<int> digits;
int a, b;
while (scanf("%d %d", &a, &b) != EOF) {
int sum = a + b;
int t = sum / 10;
int digit = 0;
while (t > 0) {
digit++;
t = t / 10;
}
digits.push_back(digit);
... | #include <iostream>
#include <vector>
#ifndef EOF
#define EOF (-1)
#endif
int main() {
std::vector<int> digits;
int a, b;
while (scanf("%d %d", &a, &b) != EOF) {
int sum = a + b;
int t = sum / 10;
int digit = 1;
while (t > 0) {
digit++;
t = t / 10;
}
digits.push_back(digit);
... | [
"literal.number.change",
"variable_declaration.value.change"
] | 5,569 | 5,570 | u606845380 | cpp |
p00002 | #include <iostream>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
a += b;
int ans = 0;
while (a != 0) {
a = a / 10;
ans++;
}
cout << ans << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
a += b;
int ans = 0;
while (a != 0) {
a = a / 10;
ans++;
}
cout << ans << endl;
}
return 0;
} | [] | 5,571 | 5,572 | u530576146 | cpp |
p00002 | #include <bits/stdc++.h>
// #include "bits/stdc++.h"
#define pout(n) printf("%d\n", n)
#define rep(i, a, n) for (int i = a; i < n; i++)
#define per(i, n, a) for (int i = n - 1; i >= a; i--)
const int d4x[4] = {1, 0, -1, 0};
const int d4y[4] = {0, 1, 0, -1};
const int d8x[8] = {1, 1, 0, -1, -1, -1, 0, 1};
const int d... | #include <bits/stdc++.h>
// #include "bits/stdc++.h"
#define pout(n) printf("%d\n", n)
#define rep(i, a, n) for (int i = a; i < n; i++)
#define per(i, n, a) for (int i = n - 1; i >= a; i--)
const int d4x[4] = {1, 0, -1, 0};
const int d4y[4] = {0, 1, 0, -1};
const int d8x[8] = {1, 1, 0, -1, -1, -1, 0, 1};
const int d... | [
"literal.number.change",
"variable_declaration.value.change"
] | 5,576 | 5,577 | u648767499 | cpp |
p00002 | #include <iostream>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
void readData(vector<string> &input_data) {
string buff;
while (getline(cin, buff))
input_data.push_back(buff);
}
int perseString(string line) {
stringstream ss;
ss << line;
int a, b;
ss >> a >> b;
ret... | #include <iostream>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
void readData(vector<string> &input_data) {
string buff;
while (getline(cin, buff))
input_data.push_back(buff);
}
int perseString(string line) {
stringstream ss;
ss << line;
int a, b;
ss >> a >> b;
ret... | [
"call.arguments.change"
] | 5,580 | 5,581 | u492510582 | cpp |
p00002 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b)
cout << (int)log10(a + b) << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
cout << (int)log10(a + b) + 1 << endl;
}
return 0;
}
| [
"expression.operation.binary.add"
] | 5,587 | 5,588 | u268387825 | cpp |
p00002 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
cout << (int)log10(a + b) << endl;
return 0;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
cout << (int)log10(a + b) + 1 << endl;
}
return 0;
}
| [
"expression.operation.binary.add"
] | 5,589 | 5,588 | u268387825 | cpp |
p00002 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
cout << (int)log10(a + b) << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
cout << (int)log10(a + b) + 1 << endl;
}
return 0;
}
| [
"expression.operation.binary.add"
] | 5,590 | 5,588 | u268387825 | cpp |
p00002 | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
int sum = a + b;
int i = 1;
int count = 0;
while (sum / i != 0) {
count++;
i *= 10;
}
cout << count;
}
return 0;
}
| #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
int sum = a + b;
int i = 1;
int count = 0;
while (sum / i != 0) {
count++;
i *= 10;
}
cout << count << endl;
}
return 0;
}
| [
"io.output.newline.add"
] | 5,591 | 5,592 | u362899430 | cpp |
p00002 | #include <iostream>
using namespace std;
int main() {
int i1, i2;
cin >> i1 >> i2;
i1 += i2;
i2 = 0;
while (i1) {
i2++;
i1 /= 10;
}
cout << i2 << endl;
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int i1, i2;
while (cin >> i1 >> i2) {
i1 += i2;
i2 = 0;
while (i1) {
i2++;
i1 /= 10;
}
cout << i2 << endl;
}
return 0;
}
| [] | 5,593 | 5,594 | u915296224 | cpp |
p00002 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
string s = to_string(a + b);
cout << s.size() << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
string s = to_string(a + b);
cout << s.size() << endl;
}
return 0;
}
| [] | 5,600 | 5,601 | u871676916 | cpp |
p00002 | #include <iostream>
#include <string>
using namespace std;
int main() {
int a, b, i;
cin >> a >> b;
a += b;
for (i = 1;; i++) {
if (a < 10) {
break;
}
a = a / 10;
}
cout << i << endl;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
int a, b, i;
while (cin >> a >> b) {
a += b;
for (i = 1;; i++) {
if (a < 10) {
break;
}
a = a / 10;
}
cout << i << endl;
}
} | [] | 5,604 | 5,605 | u025914772 | cpp |
p00002 | #include <iostream>
#include <math.h>
#include <stdio.h>
#include <vector>
using namespace std;
int main(void) {
int a = 0, b = 0, n = 1;
vector<int> r;
while (scanf("%d %d", &a, &b) != EOF) {
while ((a + b) >= pow(10, n)) {
n++;
}
r.push_back(n);
}
for (int i = 0; i < r.size(); i++) {
... | #include <iostream>
#include <math.h>
#include <stdio.h>
#include <vector>
using namespace std;
int main(void) {
int a = 0, b = 0, n = 1;
vector<int> r;
while (scanf("%d %d", &a, &b) != EOF) {
n = 1;
while ((a + b) >= pow(10, n)) {
n++;
}
r.push_back(n);
}
for (int i = 0; i < r.size(); ... | [
"assignment.add"
] | 5,606 | 5,607 | u456755759 | cpp |
p00002 | #include <iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
int k = 1, stac = a + b;
while (stac > 10) {
stac /= 10;
k++;
}
cout << k << "\n";
}
} | #include <iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
int k = 1, stac = a + b;
while (stac >= 10) {
stac /= 10;
k++;
}
cout << k << "\n";
}
} | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 5,612 | 5,613 | u852216820 | cpp |
p00002 | #include <algorithm>
#include <functional>
#include <iostream>
#include <sstream>
#include <vector>
using namespace std;
// Digit Number(0002)
int main() {
int a, b;
cin >> a >> b;
stringstream ss;
ss << a + b;
cout << ss.str().length() << endl;
return 0;
} | #include <algorithm>
#include <functional>
#include <iostream>
#include <sstream>
#include <vector>
using namespace std;
// Digit Number(0002)
int main() {
int a, b;
while (cin >> a >> b) {
stringstream ss;
ss << a + b;
cout << ss.str().length() << endl;
}
return 0;
} | [] | 5,616 | 5,617 | u256870555 | cpp |
p00002 | #include <cstdio>
using namespace std;
int toLowUnder10(int arg) {
return (10 > arg) ? arg : (toLowUnder10(arg / 10) + 1);
}
int main(int argc, char *argv[]) {
int a, b;
while (EOF != fscanf(stdin, "%d %d", &a, &b)) {
printf("%d\n", toLowUnder10(a + b));
}
return 0;
} | #include <cstdio>
int toLowUnder10(int arg) {
return (10 > arg) ? 1 : (toLowUnder10(arg / 10) + 1);
}
int main(int argc, char *argv[]) {
int a, b;
while (EOF != fscanf(stdin, "%d %d", &a, &b)) {
printf("%d\n", toLowUnder10(a + b));
}
return 0;
} | [
"identifier.replace.remove",
"literal.replace.add",
"function.return_value.change"
] | 5,618 | 5,619 | u071427789 | cpp |
p00002 | #include <iostream>
using namespace std;
int main(int argc, char const *argv[]) {
int a, b, c;
cin >> a >> b;
int i;
c = a + b;
for (i = 0; (c /= 10) != 0; i++)
;
cout << ++i << endl;
return 0;
} | #include <iostream>
using namespace std;
int main(int argc, char const *argv[]) {
int a, b, c;
while (cin >> a >> b) {
int i;
c = a + b;
for (i = 0; (c /= 10) != 0; i++)
;
cout << ++i << endl;
}
return 0;
} | [] | 5,620 | 5,621 | u017294960 | cpp |
p00002 | #include <cmath>
#include <iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
cout << (int)(log((double)a + b)) + 1 << endl;
}
} | #include <cmath>
#include <iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
cout << (int)(log10((double)a + b)) + 1 << endl;
}
} | [
"identifier.change",
"call.function.change",
"io.output.change"
] | 5,627 | 5,628 | u642549559 | cpp |
p00002 | #include <cstdio>
#include <cstdlib>
using namespace std;
int digit(int num) {
if ((num / 10) > 0)
return (digit(num / 10)) + 1;
else
return 1;
}
int main() {
int num1, num2, result = 0;
while (fscanf(stdin, "%d %d", &num1, &num2) != EOF) {
result = digit(num1 + num2);
printf("%d", result);
... | #include <cstdio>
#include <cstdlib>
using namespace std;
int digit(int num) {
if ((num / 10) > 0)
return (digit(num / 10)) + 1;
else
return 1;
}
int main() {
int num1, num2, result = 0;
while (fscanf(stdin, "%d %d", &num1, &num2) != EOF) {
result = digit(num1 + num2);
printf("%d\n", result);
... | [
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add"
] | 5,629 | 5,630 | u381402873 | cpp |
p00002 | #include <cstdio>
int main(void) {
int a, b, i, s;
while (scanf("%d", &a) != EOF) {
scanf("%d", &b);
s = a + b;
for (i = 1; s > 0; i++) {
s /= 10;
}
printf("%d\n", i);
}
return 0;
} | #include <cstdio>
int main(void) {
int a, b, i, s;
while (scanf("%d", &a) != EOF) {
scanf("%d", &b);
s = a + b;
for (i = 0; s > 0; i++) {
s /= 10;
}
printf("%d\n", i);
}
return 0;
} | [
"literal.number.change",
"assignment.value.change",
"control_flow.loop.for.initializer.change",
"expression.off_by_one"
] | 5,633 | 5,634 | u643705886 | cpp |
p00002 | #include <iostream>
using namespace std;
main() {
int i = 0;
double a, b;
double sum;
while (cin >> a >> b) {
sum = a + b;
while (sum > 1) {
i++;
// cout << i << endl;
sum /= 10;
}
cout << i << endl;
i = 0;
}
return 0;
} | #include <iostream>
using namespace std;
main() {
int i = 0;
double a, b;
double sum;
while (cin >> a >> b) {
sum = a + b;
while (sum >= 1) {
i++;
// cout << i << endl;
sum /= 10;
}
cout << i << endl;
i = 0;
}
return 0;
} | [
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 5,639 | 5,638 | u125634664 | cpp |
p00002 | #include <cstdio>
#include <iostream>
using namespace std;
int sum(int n) {
int res = 1;
while (n / 10 != 0) {
res++;
n /= 10;
}
return res;
}
int main() {
int a, b;
while (~scanf("%d %d", &a, &b)) {
printf("%d\n", sum(a) + sum(b));
}
return 0;
} | #include <cstdio>
#include <iostream>
using namespace std;
int sum(int n) {
int res = 1;
while (n / 10 != 0) {
res++;
n /= 10;
}
return res;
}
int main() {
int a, b;
while (~scanf("%d %d", &a, &b)) {
printf("%d\n", sum(a + b));
}
return 0;
} | [
"call.arguments.change"
] | 5,640 | 5,641 | u274875240 | cpp |
p00002 | #include <iostream>
using namespace std;
int main() {
const int INF = 10000000;
int a, b, c, ans;
while (cin >> a >> b) {
ans = 1;
a += b;
for (int i = 0; i < INF; i++) {
c = a % 10;
a -= c;
if (a == 0) {
break;
}
if (a != 0) {
ans++;
a /= 10;
... | #include <iostream>
using namespace std;
int main() {
const int INF = 10000000;
int a, b, c, ans;
while (cin >> a >> b) {
ans = 1;
a += b;
for (int i = 0; i < INF; i++) {
c = a % 10;
a -= c;
if (a == 0) {
break;
}
if (a != 0) {
ans++;
a /= 10;
... | [
"io.output.newline.add"
] | 5,643 | 5,644 | u863381669 | cpp |
p00002 | #include <stdio.h>
int main() {
int l, m, n, i;
while (1) {
if (scanf("%d %d", &l, &m) == EOF)
break;
n = l + m;
for (i = 1; n >= 9; i++) {
n /= 10;
}
printf("%d\n", i);
}
return 0;
} | #include <stdio.h>
int main() {
int l, m, n, i;
while (1) {
if (scanf("%d %d", &l, &m) == EOF)
break;
n = l + m;
for (i = 1; n > 9; i++) {
n /= 10;
}
printf("%d\n", i);
}
return 0;
} | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 5,645 | 5,646 | u549203837 | cpp |
p00002 | #include <iostream>
//#include <cstdio>
#include <cmath>
using namespace std;
// 0002
int main() {
int a, b, c;
while (cin >> a >> b) {
c = a + b;
cout << (int)log10(c);
}
return 0;
} | #include <iostream>
//#include <cstdio>
#include <cmath>
using namespace std;
// 0002
int main() {
int a, b, c;
while (cin >> a >> b) {
c = a + b;
cout << 1 + (int)log10(c) << endl;
}
return 0;
} | [
"io.output.newline.add"
] | 5,650 | 5,651 | u154964193 | cpp |
p00002 | #include <iostream>
//#include <cstdio>
#include <cmath>
using namespace std;
// 0002
int main() {
int a, b, c;
while (cin >> a >> b) {
c = a + b;
cout << 1 + (int)log10(c);
}
return 0;
} | #include <iostream>
//#include <cstdio>
#include <cmath>
using namespace std;
// 0002
int main() {
int a, b, c;
while (cin >> a >> b) {
c = a + b;
cout << 1 + (int)log10(c) << endl;
}
return 0;
} | [
"io.output.newline.add"
] | 5,652 | 5,651 | u154964193 | cpp |
p00002 | #include <cstdio>
int main() {
int a, b;
while (scanf("%d %d", &a, &b) != (EOF)) {
int count = 1;
double d = a + b;
while (d >= 10) {
d /= 10;
count++;
}
printf("%d", count);
}
return 0;
} | #include <cstdio>
int main() {
int a, b;
while (scanf("%d %d", &a, &b) != EOF) {
int count = 1;
double d = a + b;
while (d >= 10) {
d /= 10;
count++;
}
printf("%d\n", count);
}
return 0;
} | [
"control_flow.loop.condition.change",
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add"
] | 5,656 | 5,657 | u898551204 | cpp |
p00002 | #include <cmath>
#include <iostream>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
a = log10(a + b) + 1;
cout << a << endl;
return 0;
} | #include <cmath>
#include <iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
a = log10(a + b) + 1;
cout << a << endl;
}
return 0;
} | [] | 5,658 | 5,659 | u937978414 | cpp |
p00002 | #include <iostream>
using namespace std;
int main() {
int a, b, ans;
while (cin >> a >> b) {
a += b;
for (ans = 0; a >= 10; ans++) {
a = a / 10;
}
cout << ans << endl;
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int a, b, ans;
while (cin >> a >> b) {
a += b;
for (ans = 0; a > 0; ans++) {
a = a / 10;
}
cout << ans << endl;
}
return 0;
}
| [
"control_flow.loop.for.condition.change"
] | 5,662 | 5,663 | u377018319 | cpp |
p00002 | #include <iostream>
using namespace std;
int main(void) {
unsigned long long int a, b, sum;
while (cin >> a >> b) {
sum = a + b;
unsigned long int ans = 1;
while (sum > 10) {
sum = sum / 10;
ans++;
}
cout << ans << endl;
}
return 0;
} | #include <iostream>
using namespace std;
int main(void) {
unsigned int a, b, sum;
while (cin >> a >> b) {
sum = a + b;
unsigned int ans = 0;
while (sum > 0) {
sum = sum / 10;
ans++;
}
cout << ans << endl;
}
return 0;
} | [
"variable_declaration.type.narrow.change",
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.condition.change"
] | 5,669 | 5,668 | u491165315 | cpp |
p00002 | #include <stdio.h>
int main() {
int x, y;
while (scanf("%d %d", &x, &y) != EOF) {
int z = x + y;
int digCnt = 1;
while (z / 10 != 0) {
z /= 10;
digCnt++;
}
printf("%d", digCnt);
}
return 0;
} | #include <stdio.h>
int main() {
int x, y;
while (scanf("%d %d", &x, &y) != EOF) {
int z = x + y;
int digCnt = 1;
while (z / 10 != 0) {
z /= 10;
digCnt++;
}
printf("%d\n", digCnt);
}
return 0;
} | [
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add"
] | 5,671 | 5,672 | u464567861 | cpp |
p00002 | #include <iostream>
#include <string>
using namespace std;
int main() {
int a, b;
string input;
int size = 0;
int count = 0;
while (cin >> a >> b) {
b += a;
input = to_string(b);
size = input.size();
cout << size;
count++;
if (count == 199) {
break;
}
}
} | #include <iostream>
#include <string>
using namespace std;
int main() {
int a, b;
string input;
int size = 0;
int count = 0;
while (cin >> a >> b) {
b += a;
input = to_string(b);
size = input.size();
cout << size << endl;
count++;
if (count == 199) {
break;
}
}
} | [
"io.output.newline.add"
] | 5,673 | 5,674 | u222957942 | cpp |
p00002 | #include <algorithm>
#include <functional>
#include <iostream>
#include <vector>
int main(void) {
int val1, val2;
std::cin >> val1 >> val2;
int sum = val1 + val2;
int numDigit = 0;
while (sum > 0) {
sum /= 10;
numDigit++;
}
std::cout << numDigit << std::endl;
return 0;
} | #include <algorithm>
#include <functional>
#include <iostream>
#include <vector>
int main(void) {
int val1, val2;
while (std::cin >> val1 >> val2) {
int sum = val1 + val2;
int numDigit = 0;
while (sum > 0) {
sum /= 10;
numDigit++;
}
std::cout << numDigit << std::endl;
}
ret... | [] | 5,675 | 5,676 | u642752531 | cpp |
p00002 | #include <math.h>
#include <stdio.h>
int main() {
int a, b;
while (scanf("%d %d", &a, &b) != EOF) {
a += b;
printf("%d\n", (int)log10(a));
}
return 0;
} | #include <math.h>
#include <stdio.h>
int main() {
int a, b;
while (scanf("%d %d", &a, &b) != EOF) {
a += b;
printf("%d\n", (int)log10(a) + 1);
}
return 0;
} | [
"expression.operation.binary.add"
] | 5,677 | 5,678 | u731027244 | cpp |
p00002 | #define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <string>
#include <vector>
using namespace std;
typedef vector<int> ivector;
int main() {
int a, b;
while (scanf("%d,%d", a, b) != EOF) {
int... | #define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <string>
#include <vector>
using namespace std;
typedef vector<int> ivector;
int main() {
int a, b;
while (scanf("%d %d", &a, &b) != EOF) {
i... | [
"literal.string.change",
"control_flow.loop.condition.change"
] | 5,679 | 5,680 | u721880201 | cpp |
p00002 | #include <iostream>
#include <sstream>
#include <string>
using namespace std;
int main() {
int a, b, c;
stringstream s;
while (cin >> a >> b) {
c = a + b;
s << c;
cout << s.str().size() << endl;
}
return 0;
} | #include <iostream>
#include <sstream>
#include <string>
using namespace std;
int main() {
int a, b, c;
while (cin >> a >> b) {
stringstream s;
c = a + b;
s << c;
cout << s.str().size() << endl;
}
return 0;
} | [
"variable_declaration.remove",
"variable_declaration.add"
] | 5,681 | 5,682 | u458808208 | cpp |
p00002 | #include <climits>
#include <iostream>
#include <utility>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
int sum = a + b;
int keta;
if (sum / 1000000 >= 1)
keta = 7;
else if (sum / 100000 >= 1)
keta = 6;
else if (sum / 10000 >= 1)
keta = 5;
else if (sum / 1000 >= 1)
keta... | #include <climits>
#include <iostream>
#include <utility>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
int sum = a + b;
int keta;
if (sum / 1000000 >= 1)
keta = 7;
else if (sum / 100000 >= 1)
keta = 6;
else if (sum / 10000 >= 1)
keta = 5;
else if... | [] | 5,683 | 5,684 | u862519367 | cpp |
p00002 | #include <stdio.h>
int main(void) {
int a, b, c, i;
while (scanf("%d %d", &a, &b) != EOF) {
c = a + b;
for (i = 0; c != 0; i++) {
c /= 10;
}
printf("%d\n", i + 1);
}
return 0;
}
| #include <stdio.h>
int main(void) {
int a, b, c, i;
while (scanf("%d %d", &a, &b) != EOF) {
c = a + b;
for (i = 0; c != 0; i++) {
c /= 10;
}
printf("%d\n", i);
}
return 0;
}
| [
"expression.operation.binary.remove"
] | 5,685 | 5,686 | u152317566 | cpp |
p00002 | #include <stdio.h>
int main(void) {
int a, b, c, i;
while (scanf("%d %d", &a, &b) != EOF) {
c = a + b;
for (i = 0; c != 0; i++) {
c /= 10;
}
printf("%d\n", i + 1);
}
return 0;
}
| #include <stdio.h>
int main(void) {
int a, b, c, i;
while (scanf("%d %d", &a, &b) != EOF) {
c = a + b;
for (i = 0; c != 0; i++)
c /= 10;
printf("%d\n", i);
}
return 0;
}
| [
"expression.operation.binary.remove"
] | 5,685 | 5,687 | u152317566 | cpp |
p00002 | #include <iostream>
#include <math.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
cout << floor(log10(a + b)) + 1 << endl;
return 0;
} | #include <iostream>
#include <math.h>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
cout << floor(log10(a + b)) + 1 << endl;
}
return 0;
} | [] | 5,688 | 5,689 | u208108220 | cpp |
p00002 | #include <iostream>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
if (a + b < 10)
cout << "1" << endl;
else if (a + b < 100)
cout << "2" << endl;
else if (a + b < 1000)
cout << "3" << endl;
else if (a + b < 10000)
cout << "4" << endl;
else if (a + b < 100000)
cout << "5" ... | #include <iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
if (a + b < 10)
cout << "1" << endl;
else if (a + b < 100)
cout << "2" << endl;
else if (a + b < 1000)
cout << "3" << endl;
else if (a + b < 10000)
cout << "4" << endl;
else if (a + b... | [] | 5,821 | 5,822 | u116642825 | cpp |
p00002 | #include <cmath>
#include <iostream>
using namespace std;
int main() {
int a, b, x, keta;
while (cin >> a >> b) {
x = a + b;
keta = log10(x);
cout << keta << endl;
}
} | #include <cmath>
#include <iostream>
using namespace std;
int main() {
int a, b, x, keta;
while (cin >> a >> b) {
x = a + b;
keta = log10(x) + 1;
cout << keta << endl;
}
} | [
"assignment.change"
] | 5,825 | 5,826 | u284652320 | cpp |
p00002 | #include <cmath>
#include <iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
a = log10(a + b) + 1;
cout << a;
return 0;
}
} | #include <cmath>
#include <iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
a = log10(a + b) + 1;
cout << a << endl;
}
return 0;
} | [
"io.output.newline.add"
] | 5,829 | 5,830 | u479400849 | cpp |
p00002 | #include <cmath>
#include <iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
a = log10(a + b) + 1;
cout << a << endl;
return 0;
}
} | #include <cmath>
#include <iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
a = log10(a + b) + 1;
cout << a << endl;
}
return 0;
} | [] | 5,831 | 5,830 | u479400849 | cpp |
p00002 | #include <iostream>
using namespace std;
int main() {
unsigned int a, b, c;
// while (1) {
cin >> a >> b;
a += b;
c = 0;
do {
a /= 10;
c++;
} while (a);
cout << c << endl;
// }
return 0;
} | #include <iostream>
using namespace std;
int main() {
unsigned int a, b, c;
while (cin >> a >> b) {
a += b;
c = 0;
do {
a /= 10;
c++;
} while (a);
cout << c << endl;
}
return 0;
} | [] | 5,832 | 5,833 | u841770308 | cpp |
p00002 | #include <iostream>
using namespace std;
int main() {
char a, b, sum, cnt = 0;
while (cin >> a >> b) {
sum = a + b;
while (1) {
if (sum < 10)
break;
sum /= 10;
cnt++;
}
cout << cnt << endl;
cnt = 0;
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
int a, b, sum, cnt = 1;
while (cin >> a >> b) {
sum = a + b;
while (1) {
if (sum < 10)
break;
sum /= 10;
cnt++;
}
cout << cnt << endl;
cnt = 1;
}
return 0;
} | [
"variable_declaration.type.primitive.change",
"literal.number.change",
"variable_declaration.value.change",
"assignment.value.change"
] | 5,834 | 5,835 | u393312973 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.