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 |
|---|---|---|---|---|---|---|---|
p00004 | #include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int a, b, c, d, e, f;
while (cin >> a >> b >> c >> d >> e >> f) {
double x = (e * c - b * f) / (e * a - b * d);
double y = (c - a * x) / b;
if (x == 0)
x = 0;
... | #include <iomanip>
#include <iostream>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
double a, b, c, d, e, f;
while (cin >> a >> b >> c >> d >> e >> f) {
double x = (e * c - b * f) / (e * a - b * d);
double y = (c - a * x) / b;
if (x == 0)
x = 0;
if (y == 0)
... | [
"variable_declaration.type.primitive.change"
] | 7,753 | 7,754 | u557138543 | cpp |
p00004 | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main() {
double a[3], b[3];
while (cin >> a[0] >> a[1] >> a[2] >> b[0] >> b[1] >> b[2]) {
if (a[0] == 0) {
double c = a[2] / a[1];
double d =... | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main() {
double a[3], b[3];
while (cin >> a[0] >> a[1] >> a[2] >> b[0] >> b[1] >> b[2]) {
if (a[0] == 0) {
double c = a[2] / a[1];
double d =... | [
"io.output.change"
] | 7,755 | 7,756 | u691023889 | cpp |
p00004 | #include <iostream>
using namespace std;
int main() {
double a, b, c, d, e, f, g;
double x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
g = a * e - b * d;
x = (c * e - b * f) / g;
if (!x)
x = 0;
y = (a * f - c * d) / g;
if (!y)
y = 0;
printf("%.3f %.3f", x, y);
}
} | #include <iostream>
using namespace std;
int main() {
double a, b, c, d, e, f, g;
double x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
g = a * e - b * d;
x = (c * e - b * f) / g;
if (!x)
x = 0;
y = (a * f - c * d) / g;
if (!y)
y = 0;
printf("%.3f %.3f\n", x, y);
}
} | [
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add"
] | 7,757 | 7,758 | u805752636 | cpp |
p00004 | #include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
int main(void) {
double a, b, c, d, e, f, x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
y = (a * f - d * c) / (a * e - b * d);
x = (e - b * y) / a;
y = double(round(y * 1000)) / 1000;
x = double(round(x * 1000)) / 100... | #include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
int main(void) {
double a, b, c, d, e, f, x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
y = (a * f - d * c) / (a * e - b * d);
x = (c - b * y) / a;
y = double(round(y * 1000)) / 1000.0;
x = double(round(x * 1000)) / 1... | [
"expression.operation.binary.change",
"literal.number.change"
] | 7,761 | 7,762 | u690299834 | cpp |
p00004 | #include <cstdio>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <vector>
using namespace std;
class SimultaneousEquation {
public:
void solve(int a, int b, int c, int d, int e, int f) {
double x, y;
x = double(c * e - b * f) / (a * e - b * d);
y = double(c * d - a * f) / (b * d - a * e... | #include <cstdio>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <vector>
using namespace std;
class SimultaneousEquation {
public:
void solve(int a, int b, int c, int d, int e, int f) {
double x, y;
x = double(c * e - b * f) / (a * e - b * d);
y = double(c * d - a * f) / (b * d - a * e... | [
"call.arguments.change"
] | 7,763 | 7,764 | u814387366 | cpp |
p00004 | //
// main.cpp
// CppTest
//
// Created by Ryu on 2017/02/08.
// Copyright ?? 2017??´ Ryu. All rights reserved.
//
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int main(int argc, const char *argv[]) {
// insert code here...
cin.tie(0);
ios::sync_with_stdio... | //
// main.cpp
// CppTest
//
// Created by Ryu on 2017/02/08.
// Copyright ?? 2017??´ Ryu. All rights reserved.
//
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int main(int argc, const char *argv[]) {
// insert code here...
cin.tie(0);
ios::sync_with_stdio... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 7,769 | 7,770 | u636445019 | cpp |
p00004 | #include <iomanip>
#include <iostream>
using namespace std;
int main() {
for (double a1, b1, c1, d1, e1, f1, b2, c2, e2, f2, a3, c3, d3, f3, x, y;
cin >> a1 >> b1 >> c1 >> d1 >> e1 >> f1;) {
b2 = b1 * d1;
c2 = c1 * d1;
e2 = a1 * e1;
f2 = a1 * f1;
y = (c2 - f2) / (b2 - e2);
if (y == ... | #include <iomanip>
#include <iostream>
using namespace std;
int main() {
for (double a1, b1, c1, d1, e1, f1, b2, c2, e2, f2, a3, c3, d3, f3, x, y;
cin >> a1 >> b1 >> c1 >> d1 >> e1 >> f1;) {
b2 = b1 * d1;
c2 = c1 * d1;
e2 = a1 * e1;
f2 = a1 * f1;
y = (c2 - f2) / (b2 - e2);
if (y == ... | [
"io.output.newline.add"
] | 7,771 | 7,772 | u667586079 | cpp |
p00004 | /* All men have limits. They learn what they are and learn
not to exceed them, I ignore mine. -Batman */
#include <bits/stdc++.h>
//#include <iostream>
//#include <vector>
//#include <Windows.h>
using namespace std;
int main() {
int a, b, c, d, e, f;
double x, y;
while (cin >> a >> b >> c >> d >> e ... | /* All men have limits. They learn what they are and learn
not to exceed them, I ignore mine. -Batman */
#include <bits/stdc++.h>
//#include <iostream>
//#include <vector>
//#include <Windows.h>
using namespace std;
int main() {
int a, b, c, d, e, f;
double x, y;
while (cin >> a >> b >> c >> d >> e ... | [
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add"
] | 7,773 | 7,774 | u296429647 | cpp |
p00004 | /*
????????°??§???????????¨????????????
*/
#include <algorithm>
#include <ctype.h>
#include <iostream>
#include <iterator>
#include <limits.h>
#include <map>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <time.h>
#include <utility>
#include <vector>
#define... | /*
????????°??§???????????¨????????????
*/
#include <algorithm>
#include <ctype.h>
#include <iostream>
#include <iterator>
#include <limits.h>
#include <map>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <time.h>
#include <utility>
#include <vector>
#define... | [
"variable_declaration.type.primitive.change",
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 7,775 | 7,776 | u993397917 | cpp |
p00004 | #include <iostream>
#include <vector>
void solv(double a, double b, double c, double d, double e, double f, double &x,
double &y) {
y = (f - (d * c) / a) / (e - (b * d) / a);
x = (c - b * y) / a;
}
int main() {
std::vector<std::pair<double, double>> ans;
double a, b, c, d, e, f;
std::pair<double,... | #include <iostream>
#include <vector>
void solv(double a, double b, double c, double d, double e, double f, double &x,
double &y) {
y = (f - (d * c) / a) / (e - (b * d) / a);
x = (c - b * y) / a;
}
int main() {
std::vector<std::pair<double, double>> ans;
double a, b, c, d, e, f;
std::pair<double,... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 7,777 | 7,778 | u256863663 | cpp |
p00004 | #include <bits/stdc++.h>
using namespace std;
int main() {
double a, b, c, d, e, f;
cin >> a >> b >> c >> d >> e >> f;
if (c * e == f * b || a * e == d * b)
printf("0.000 ");
else
printf("%.3f ", (c * e - f * b) / (a * e - d * b));
if (c * d == f * a || b * d == e * a)
printf("0.000\n");
else... | #include <bits/stdc++.h>
using namespace std;
int main() {
double a, b, c, d, e, f;
while (cin >> a) {
cin >> b >> c >> d >> e >> f;
if (c * e == f * b || a * e == d * b)
printf("0.000 ");
else
printf("%.3f ", (c * e - f * b) / (a * e - d * b));
if (c * d == f * a || b * d == e * a)
... | [] | 7,779 | 7,780 | u354244251 | cpp |
p00004 | #include <iomanip>
#include <iostream>
using namespace std;
int main(void) {
int a, b, c, d, e, f;
double ansX, ansY;
while (std::cin >> a >> b >> c >> d >> e >> f) {
ansX = (c * e - b * f) / (a * e - b * d);
ansX *= 1000;
if (ansX > 0)
ansX += 0.5;
else
ansX -= 0.5;
ansX = int(a... | #include <iomanip>
#include <iostream>
using namespace std;
int main(void) {
double a, b, c, d, e, f;
double ansX, ansY;
while (std::cin >> a >> b >> c >> d >> e >> f) {
ansX = (c * e - b * f) / (a * e - b * d);
ansX *= 1000;
if (ansX > 0)
ansX += 0.5;
else
ansX -= 0.5;
ansX = int... | [
"variable_declaration.type.primitive.change",
"control_flow.return.add",
"control_flow.return.0.add"
] | 7,781 | 7,782 | u113677534 | cpp |
p00004 | #include <iomanip>
#include <iostream>
using namespace std;
int main(void) {
int a, b, c, d, e, f;
double ansX, ansY;
while (std::cin >> a >> b >> c >> d >> e >> f) {
ansX = (c * e - b * f) / (a * e - b * d);
ansX *= 1000;
if (ansX > 0)
ansX += 0.5;
else
ansX -= 0.5;
ansX = int(an... | #include <iomanip>
#include <iostream>
using namespace std;
int main(void) {
double a, b, c, d, e, f;
double ansX, ansY;
while (std::cin >> a >> b >> c >> d >> e >> f) {
ansX = (c * e - b * f) / (a * e - b * d);
ansX *= 1000;
if (ansX > 0)
ansX += 0.5;
else
ansX -= 0.5;
ansX = int... | [
"variable_declaration.type.primitive.change",
"control_flow.return.add",
"control_flow.return.0.add"
] | 7,784 | 7,782 | u113677534 | cpp |
p00004 | #include <iomanip>
#include <iostream>
using namespace std;
int main(void) {
int a, b, c, d, e, f;
double ansX, ansY;
while (std::cin >> a >> b >> c >> d >> e >> f) {
ansX = (c * e - b * f) / (a * e - b * d);
ansX *= 1000;
if (ansX > 0)
ansX += 0.5;
else
ansX -= 0.5;
ansX = int(an... | #include <iomanip>
#include <iostream>
using namespace std;
int main(void) {
double a, b, c, d, e, f;
double ansX, ansY;
while (std::cin >> a >> b >> c >> d >> e >> f) {
ansX = (c * e - b * f) / (a * e - b * d);
ansX *= 1000;
if (ansX > 0)
ansX += 0.5;
else
ansX -= 0.5;
ansX = int... | [
"variable_declaration.type.primitive.change"
] | 7,786 | 7,782 | u113677534 | cpp |
p00004 | #include <iomanip>
#include <iostream>
using namespace std;
int main(void) {
// Here your code !
double a, b, c, d, e, f;
while (cin >> a >> b >> c >> d >> e >> f) {
double x = (c * e - b * f) / (a * e - b * d);
double y = (a * f - c * d) / (a * e - b * d);
x *= 1000;
x = x + (x > 0 ? 0.5 : -0.5);... | #include <iomanip>
#include <iostream>
using namespace std;
int main(void) {
// Here your code !
double a, b, c, d, e, f;
while (cin >> a >> b >> c >> d >> e >> f) {
double x = (c * e - b * f) / (a * e - b * d);
double y = (a * f - c * d) / (a * e - b * d);
x *= 1000;
x = x + (x > 0 ? 0.5 : -0.5);... | [
"literal.number.change",
"io.output.change",
"literal.string.change"
] | 7,787 | 7,788 | u447103956 | cpp |
p00004 | #include <iomanip>
#include <iostream>
using namespace std;
int main() {
double x, y, a, b, c, d, e, f;
while (cin >> a >> b >> c >> d >> e >> f) {
x = (double)(c * e - f * b) / (a * e - b * d);
y = (double)(c * d - a * f) / (b * d - a * e);
if (x == 0)
x = 0;
if (y == 0)
y = 0;
... | #include <iomanip>
#include <iostream>
using namespace std;
int main() {
double x, y, a, b, c, d, e, f;
while (cin >> a >> b >> c >> d >> e >> f) {
x = (double)(c * e - f * b) / (a * e - b * d);
y = (double)(c * d - a * f) / (b * d - a * e);
if (x == 0)
x = 0;
if (y == 0)
y = 0;
... | [
"io.output.newline.add"
] | 7,794 | 7,795 | u960101870 | cpp |
p00004 | #include <cmath>
#include <iostream>
#include <utility>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.setf(ios::fixed);
cout.precision(8);
double a1, b1, c1, a2, b2, c2;
while (cin >> a1 >> b1 >> c1 >> a2 >> b2 >> c2) {
double m = a1 * b2 - a2 * b1;
double x = (c1 ... | #include <cmath>
#include <iostream>
#include <utility>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.setf(ios::fixed);
cout.precision(3);
double a1, b1, c1, a2, b2, c2;
while (cin >> a1 >> b1 >> c1 >> a2 >> b2 >> c2) {
double m = a1 * b2 - a2 * b1;
double x = (c1 ... | [
"literal.number.change",
"io.output.change",
"identifier.change",
"call.function.change",
"control_flow.branch.if.condition.change"
] | 7,796 | 7,797 | u277798389 | cpp |
p00004 | #include <cmath>
#include <iostream>
#include <utility>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.setf(ios::fixed);
cout.precision(8);
double a1, b1, c1, a2, b2, c2;
while (cin >> a1 >> b1 >> c1 >> a2 >> b2 >> c2) {
double m = a1 * b2 - a2 * b1;
double x = (c1 ... | #include <cmath>
#include <iostream>
#include <utility>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.setf(ios::fixed);
cout.precision(3);
double a1, b1, c1, a2, b2, c2;
while (cin >> a1 >> b1 >> c1 >> a2 >> b2 >> c2) {
double m = a1 * b2 - a2 * b1;
double x = (c1 ... | [
"literal.number.change",
"io.output.change"
] | 7,798 | 7,797 | u277798389 | cpp |
p00004 | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <ctime>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <memory.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#pragma comment(linker, "/STACK:836777216")
us... | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <ctime>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <memory.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#pragma comment(linker, "/STACK:836777216")
us... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 7,799 | 7,800 | u693646660 | cpp |
p00004 | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <ctime>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <memory.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#pragma comment(linker, "/STACK:836777216")
us... | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <ctime>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <memory.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#pragma comment(linker, "/STACK:836777216")
us... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 7,801 | 7,800 | u693646660 | cpp |
p00004 | #include "bits/stdc++.h"
using namespace std;
int main() {
double a, b, c, d, e, f;
while (cin >> a >> b >> c >> d >> e >> f) {
double y = (a * f - d * c) / (a * e - d * b);
double x = (c - b * y) / a;
cout << fixed << setprecision(5) << x << " " << y << endl;
}
return 0;
} | #include "bits/stdc++.h"
using namespace std;
int main() {
double a, b, c, d, e, f;
while (cin >> a >> b >> c >> d >> e >> f) {
double y = (a * f - d * c) / (a * e - d * b);
double x = (c - b * y) / a;
cout << fixed << setprecision(3) << x << " " << y << endl;
}
return 0;
} | [
"literal.number.change",
"io.output.change"
] | 7,804 | 7,805 | u321462250 | cpp |
p00004 | #include <iomanip>
#include <iostream>
using namespace std;
int main() {
double a, b, c, d, e, f, x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
y = (d * c - a * f) / (d * b - a * e);
x = (e * c - b * f) / (e * a - b * d);
if (x == -0)
x = 0;
if (x == -0)
y = 0;
cout << fixed... | #include <iomanip>
#include <iostream>
using namespace std;
int main() {
double a, b, c, d, e, f, x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
y = (d * c - a * f) / (d * b - a * e);
x = (e * c - b * f) / (e * a - b * d);
if (x == -0)
x = 0;
if (y == -0)
y = 0;
cout << fixed... | [
"control_flow.branch.if.condition.change"
] | 7,808 | 7,809 | u226511948 | cpp |
p00004 | #pragma GCC optimize "O3"
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <set>
#inc... | #pragma GCC optimize "O3"
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <set>
#inc... | [
"type_conversion.add"
] | 7,810 | 7,811 | u418027098 | cpp |
p00004 | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int a, b, c, d, e, f;
double x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
y = ((d * c) - (a * f)) / ((b * d) - (a * e));
x = (c - (b * y)) / a;
if (x == 0)
x = 0;
if (y == 0)
y = 0;
printf("%.3f %.3f\n", x... | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
double a, b, c, d, e, f;
double x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
y = ((d * c) - (a * f)) / ((b * d) - (a * e));
x = (c - (b * y)) / a;
if (x == 0)
x = 0;
if (y == 0)
y = 0;
printf("%.3f %.3f\n"... | [
"variable_declaration.type.primitive.change"
] | 7,812 | 7,813 | u246176813 | cpp |
p00004 | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
double a, b, c, d, e, f, x, y;
while (1) {
cin >> a >> b >> c >> d >> e >> f;
if (cin.eof()) {
break;
}
x = ((b * f) - (e * c)) / ((b * d) - (a * e));
y = ((a * f) - (d * c)... | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
double a, b, c, d, e, f, x, y;
while (1) {
cin >> a >> b >> c >> d >> e >> f;
if (cin.eof()) {
break;
}
x = ((b * f) - (e * c)) / ((b * d) - (a * e));
y = ((a * f) - (d * c)... | [
"io.output.change"
] | 7,814 | 7,815 | u086896364 | cpp |
p00004 | #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
double a, b, c, d, e, f;
double x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
y = (c * d - a * f) / (b * d - a * e);
x = (c - b * y) / a;
printf("%.3f %.3f", x, y);
}
return 0;
} | #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
double a, b, c, d, e, f;
double x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
y = (c * d - a * f) / (b * d - a * e);
x = (c - b * y) / a;
printf("%.3f %.3f\n", x, y);
}
return 0;
} | [
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add"
] | 7,816 | 7,817 | u546285759 | cpp |
p00004 | #include <iomanip>
#include <iostream>
using namespace std;
int main() {
int a, b, c, d, e, f;
double x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
y = (a * f - d * c) / (a * e - b * d);
x = (c - b * y) / a;
cout << setprecision(3) << setiosflags(ios::fixed) << x << ' '
<< setprecision(... | #include <iomanip>
#include <iostream>
using namespace std;
int main() {
int a, b, c, d, e, f;
double x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
y = (double)(a * f - d * c) / (a * e - b * d);
x = (c - b * y) / a;
cout << setprecision(3) << setiosflags(ios::fixed) << x << ' '
<< setpr... | [
"type_conversion.add"
] | 7,818 | 7,819 | u566872786 | cpp |
p00004 | #include <iomanip>
#include <iostream>
using namespace std;
int main() {
int a, b, c, d, e, f;
double x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
y = (a * f - d * c) / (a * e - b * d);
x = (c - b * y) / a;
cout << setprecision(3) << setiosflags(ios::fixed) << x << ' '
<< setprecision(... | #include <iomanip>
#include <iostream>
using namespace std;
int main() {
double a, b, c, d, e, f;
double x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
y = (double)(a * f - d * c) / (a * e - b * d);
x = (c - b * y) / a;
cout << setprecision(3) << setiosflags(ios::fixed) << x << ' '
<< se... | [
"variable_declaration.type.primitive.change"
] | 7,818 | 7,820 | u566872786 | cpp |
p00004 | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
#define REP(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
using namespace std;
int kaijo(int n) {
int ans = 1;
if (n != 0) {
for (int i = 0; i < n; i++) {
ans *= (n - i);
}
} ... | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
#define REP(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
using namespace std;
int kaijo(int n) {
int ans = 1;
if (n != 0) {
for (int i = 0; i < n; i++) {
ans *= (n - i);
}
} ... | [
"control_flow.branch.if.condition.change",
"call.add"
] | 7,821 | 7,822 | u000096402 | cpp |
p00004 | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
double a, b, c, d, e, f, x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
double w = 1.0 / (a * e - b * d);
double x = w * (e * c - b * f);
double y = w * (-d * c + a * f);
if (x == 0)
x = 0;
if (y == 0)
y = 0;... | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
double a, b, c, d, e, f, x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
double w = 1.0 / (a * e - b * d);
double x = w * (e * c - b * f);
double y = w * (-d * c + a * f);
if (x == 0)
x = 0;
if (y == 0)
y = 0;... | [
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add"
] | 7,823 | 7,824 | u554688210 | cpp |
p00004 | #include <iomanip>
#include <iostream>
using namespace std;
int main() {
double a, b, c, d, e, f;
double x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
x = (double)((c * e - b * f) / (a * e - b * d) * 100) / 1000.0;
y = (double)((d * c - a * f) / (b * d - a * e) * 100) / 1000.0;
x = (x == -0.0) ? 0... | #include <iomanip>
#include <iostream>
using namespace std;
int main() {
double a, b, c, d, e, f;
double x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
x = (double)((c * e - b * f) / (a * e - b * d) * 1000) / 1000.0;
y = (double)((d * c - a * f) / (b * d - a * e) * 1000) / 1000.0;
x = (x == -0.0) ?... | [
"literal.number.change",
"expression.operation.binary.change"
] | 7,828 | 7,829 | u548440719 | cpp |
p00004 | #include <stdio.h>
int main(void) {
double a, b, c, d, e, f;
while (scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f) != EOF) {
double ee = e / b, dd = d / a;
double ax = a * ee, cx = c * ee;
printf("%f ", (cx - f) / (ax - d) == -0 ? 0 : (cx - f) / (ax - d));
b *= dd, c *= dd;
printf("%f\n", ... | #include <stdio.h>
int main(void) {
double a, b, c, d, e, f;
while (scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f) != EOF) {
double ee = e / b, dd = d / a;
double ax = a * ee, cx = c * ee;
printf("%.3f ", (cx - f) / (ax - d) == -0 ? 0 : (cx - f) / (ax - d));
b *= dd, c *= dd;
printf("%.3f\... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 7,833 | 7,834 | u428870975 | cpp |
p00004 | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int T;
double a, b, c, d, e, f;
while (cin >> a >> b >> c >> d >> e >> f) {
double D = a * e - b * d;
double x = c * e - b * f;
double y = a * f - c * d;
x /= D;
y /= D;
x += 1e-... | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int T;
double a, b, c, d, e, f;
while (cin >> a >> b >> c >> d >> e >> f) {
double D = a * e - b * d;
double x = c * e - b * f;
double y = a * f - c * d;
x /= D;
y /= D;
x += 1e-... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 7,835 | 7,836 | u458173932 | cpp |
p00004 | #include <iomanip>
#include <iostream>
using namespace std;
int main() {
double a, b, c, d, e, f;
double x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
y = (c * d - a * f) / (b * d - a * e);
x = (c - (b * y)) / a;
cout << setiosflags(ios::showpoint) << setprecision(4) << x << " " << y
<< ... | #include <iomanip>
#include <iostream>
using namespace std;
int main() {
double a, b, c, d, e, f;
double x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
y = (c * d - a * f) / (b * d - a * e);
x = (c - (b * y)) / a;
cout << setiosflags(ios::fixed) << setprecision(3) << x << " " << y << endl;
}
r... | [
"io.output.change",
"literal.number.change"
] | 7,837 | 7,838 | u609578509 | cpp |
p00004 | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout << fixed << setprecision(12);
double a, b, c, d, e, f, x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
x = (c * e - b * f) / (a * e - d * b);
y = (a * f - c * d) / (a * e - b * d);
if ... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout << fixed << setprecision(3);
double a, b, c, d, e, f, x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
x = (c * e - b * f) / (a * e - d * b);
y = (a * f - c * d) / (a * e - b * d);
if (... | [
"io.output.change"
] | 7,845 | 7,844 | u671493887 | cpp |
p00004 | #include <iomanip>
#include <iostream>
using namespace std;
int main(void) {
int a, b, c, d, e, f;
double x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
x = (b * f - c * e) / (b * d - a * e);
y = (a * f - c * d) / (a * e - b * d);
if (x == 0)
x = 0;
if (y == 0)
y = 0;
cout << fi... | #include <iomanip>
#include <iostream>
using namespace std;
int main(void) {
double a, b, c, d, e, f;
double x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
x = (b * f - c * e) / (b * d - a * e);
y = (a * f - c * d) / (a * e - b * d);
if (x == 0)
x = 0.000;
if (y == 0)
y = 0.000;
... | [
"variable_declaration.type.primitive.change",
"literal.number.change",
"assignment.value.change"
] | 7,848 | 7,849 | u047611969 | cpp |
p00004 | #include <iomanip>
#include <iostream>
using namespace std;
int main(void) {
int a, b, c, d, e, f;
double x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
x = (b * f - c * e) / (b * d - a * e);
y = (a * f - c * d) / (a * e - b * d);
if (x == 0)
x = 0.000;
if (y == 0)
y = 0.000;
co... | #include <iomanip>
#include <iostream>
using namespace std;
int main(void) {
double a, b, c, d, e, f;
double x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
x = (b * f - c * e) / (b * d - a * e);
y = (a * f - c * d) / (a * e - b * d);
if (x == 0)
x = 0.000;
if (y == 0)
y = 0.000;
... | [
"variable_declaration.type.primitive.change"
] | 7,850 | 7,849 | u047611969 | cpp |
p00004 | #include <bits/stdc++.h>
using namespace std;
int main() {
double a, b, c, d, e, f;
cin >> a >> b >> c >> d >> e >> f;
double x, y;
y = (a * f - d * c) / (a * e - d * b);
x = (c - b * y) / a;
//小数点以下4桁で四捨五入して表示
cout << fixed << setprecision(3) << x << " " << y << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
double a, b, c, d, e, f;
while (cin >> a >> b >> c >> d >> e >> f) {
double x, y;
y = (a * f - d * c) / (a * e - d * b);
x = (c - b * y) / a;
//小数点以下4桁で四捨五入して表示
cout << fixed << setprecision(3) << x << " " << y << endl;
}
return 0... | [] | 7,851 | 7,852 | u871676916 | cpp |
p00004 | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
double a, b, c, d, e, f;
cin >> a >> b >> c >> d >> e >> f;
double A = a * e - b * d;
double ans1, ans2;
ans1 = (c * e - b * f) / A;
ans2 = (-c * d + a * f) / A;
if (ans1 < 0.0005 && ans1 > -0.0005)
ans1 = 0;
if (ans2 < 0.000... | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
double a, b, c, d, e, f;
while (cin >> a >> b >> c >> d >> e >> f) {
double A = a * e - b * d;
double ans1, ans2;
ans1 = (c * e - b * f) / A;
ans2 = (-c * d + a * f) / A;
if (ans1 < 0.0005 && ans1 > -0.0005)
ans1 = ... | [] | 7,855 | 7,856 | u977061810 | cpp |
p00004 | #include <iostream>
using namespace std;
int main() {
int a, b, c, d, e, f;
while (cin >> a >> b >> c >> d >> e >> f) {
double detA;
double ansx, ansy;
detA = (a * e) - (b * d);
ansx = ((c * e) - (b * f)) / detA;
ansy = ((a * f) - (c * d)) / detA;
if (ansx == 0) {
ansx = 0;
}
... | #include <iostream>
using namespace std;
int main() {
int a, b, c, d, e, f;
while (cin >> a >> b >> c >> d >> e >> f) {
double detA;
double ansx, ansy;
detA = (a * e) - (b * d);
ansx = ((c * e) - (b * f)) / detA;
ansy = ((a * f) - (c * d)) / detA;
if (ansx == 0) {
ansx = 0;
}
... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 7,857 | 7,858 | u025914772 | cpp |
p00004 | #include <cstdio>
int main(int argc, char *argv[]) {
using namespace std;
int a, b, c, d, e, f;
while (EOF != fscanf(stdin, "%d %d %d %d %d %d\n", &a, &b, &c, &d, &e, &f)) {
float tmp1 =
static_cast<float>(f) -
(static_cast<float>(c) * static_cast<float>(d) / static_cast<float>(a));
float... | #include <cstdio>
int main(int argc, char *argv[]) {
using namespace std;
int a, b, c, d, e, f;
while (EOF != fscanf(stdin, "%d %d %d %d %d %d\n", &a, &b, &c, &d, &e, &f)) {
float tmp1 =
static_cast<float>(f) -
(static_cast<float>(c) * static_cast<float>(d) / static_cast<float>(a));
float... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 7,859 | 7,860 | u071427789 | cpp |
p00004 | #include <cstdio>
int main(int argc, char *argv[]) {
using namespace std;
int a, b, c, d, e, f;
while (EOF != fscanf(stdin, "%d %d %d %d %d %d\n", &a, &b, &c, &d, &e, &f)) {
float tmp1 =
static_cast<float>(f) -
(static_cast<float>(c) * static_cast<float>(d) / static_cast<float>(a));
float... | #include <cstdio>
int main(int argc, char *argv[]) {
using namespace std;
int a, b, c, d, e, f;
while (EOF != fscanf(stdin, "%d %d %d %d %d %d\n", &a, &b, &c, &d, &e, &f)) {
float tmp1 =
static_cast<float>(f) -
(static_cast<float>(c) * static_cast<float>(d) / static_cast<float>(a));
float ... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 7,859 | 7,862 | u071427789 | cpp |
p00004 | #include <algorithm>
#include <iomanip>
#include <iostream>
using namespace std;
int main(void) {
double x, y;
double a, b, c, d, e, f;
while (1) {
cin >> a >> b >> c >> d >> e >> f;
if (cin.eof()) {
break;
}
y = (f - d * (c / a)) / (-d * (b / a) + e);
x = (c - b * y) / a;
cout <... | #include <algorithm>
#include <iomanip>
#include <iostream>
using namespace std;
int main(void) {
double x, y;
double a, b, c, d, e, f;
while (1) {
cin >> a >> b >> c >> d >> e >> f;
if (cin.eof()) {
break;
}
y = (f - d * (c / a)) / (-d * (b / a) + e);
x = (c - b * y) / a;
cout <... | [
"literal.number.change",
"io.output.change"
] | 7,866 | 7,867 | u209297999 | cpp |
p00004 | #include <iostream>
using namespace std;
int main() {
double a[6], x, y;
while (cin >> a[0]) {
for (int i = 1; i < 6; i++) {
cin >> a[i];
}
y = (a[2] * a[3] - a[0] * a[5]) / (a[1] * a[3] - a[0] * a[4]);
x = (a[2] - a[1] * y) / a[0];
if (x >= 0)
x = ((double)((int)(x * 1000 + 0.5))... | #include <iostream>
using namespace std;
int main() {
double a[6], x, y;
while (cin >> a[0]) {
for (int i = 1; i < 6; i++) {
cin >> a[i];
}
y = (a[2] * a[3] - a[0] * a[5]) / (a[1] * a[3] - a[0] * a[4]);
x = (a[2] - a[1] * y) / a[0];
if (x >= 0)
x = ((double)((int)(x * 1000 + 0.5))... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"expression.operation.binary.change"
] | 7,868 | 7,869 | u439230786 | cpp |
p00004 | #include <algorithm>
#include <cstdio>
using namespace std;
int main() {
for (double a, b, c, d, e, f;
scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f) != EOF;) {
double det = a * e - b * d;
double x = (e * c - b * f) / det;
double y = (-d * c + a * f) / det;
printf("%.4f %.4f\n", x + 1e-8,... | #include <algorithm>
#include <cstdio>
using namespace std;
int main() {
for (double a, b, c, d, e, f;
scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f) != EOF;) {
double det = a * e - b * d;
double x = (e * c - b * f) / det;
double y = (-d * c + a * f) / det;
printf("%.3f %.3f\n", x + 1e-8,... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 7,870 | 7,871 | u434428594 | cpp |
p00004 | #include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
double round(double src, int n);
int main() {
int a, b, c, d, e, f;
while (cin >> a >> b >> c >> d >> e >> f) {
double x = (b * f - c * e) / (b * d - a * e);
double y = (a * f - c * d) / (a * e - b * d);
x = round(x, 4);
... | #include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
double round(double src, int n);
int main() {
double a, b, c, d, e, f;
while (cin >> a >> b >> c >> d >> e >> f) {
double x = (b * f - c * e) / (b * d - a * e);
double y = (a * f - c * d) / (a * e - b * d);
x = round(x, 4);... | [
"variable_declaration.type.primitive.change"
] | 7,874 | 7,875 | u621917792 | cpp |
p00004 | #include <iostream>
using namespace std;
int main() {
int a, b, c, d, e, f;
double x, y;
double t;
while (cin >> a >> b >> c >> d >> e >> f) {
t = a * e - b * d;
x = (e * c - b * f) / t + 0.0;
y = (a * f - d * c) / t + 0.0;
printf("%f %f\n", x, y);
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
int a, b, c, d, e, f;
double x, y;
double t;
while (cin >> a >> b >> c >> d >> e >> f) {
t = a * e - b * d;
x = (e * c - b * f) / t + 0.0;
y = (a * f - d * c) / t + 0.0;
printf("%.3lf %.3lf\n", x, y);
}
return 0;
} | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 7,876 | 7,877 | u874069413 | cpp |
p00004 | #include "stdio.h"
#include <iostream>
using namespace std;
int main() {
double a, b, c, d, e, f;
double x, y;
cin >> a >> b >> c >> d >> e >> f;
y = (f - d * c / a) / (e - b * d / a);
x = (c - b * y) / a;
// cout << x << endl << y << endl;
printf("%.3f\n", x);
printf("%.3f\n", y);
} | #include "stdio.h"
#include <iostream>
using namespace std;
int main() {
double a, b, c, d, e, f;
double x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
y = (f - d * c / a) / (e - b * d / a);
x = (c - b * y) / a;
// cout << x << endl << y << endl;
printf("%.3f ", x);
printf("%.3f\n", y);... | [
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.remove"
] | 7,878 | 7,879 | u437039370 | cpp |
p00004 | #include "stdio.h"
#include <iostream>
using namespace std;
int main() {
double a, b, c, d, e, f;
double x, y;
cin >> a >> b >> c >> d >> e >> f;
y = (f - d * c / a) / (e - b * d / a);
x = (c - b * y) / a;
// cout << x << endl << y << endl;
printf("%.3f ", x);
printf("%.3f\n", y);
} | #include "stdio.h"
#include <iostream>
using namespace std;
int main() {
double a, b, c, d, e, f;
double x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
y = (f - d * c / a) / (e - b * d / a);
x = (c - b * y) / a;
// cout << x << endl << y << endl;
printf("%.3f ", x);
printf("%.3f\n", y);... | [] | 7,880 | 7,879 | u437039370 | cpp |
p00004 | #include <iomanip>
#include <iostream>
using namespace std;
int main() {
double a, b, c, d, e, f, x, y;
cin >> a >> b >> c >> d >> e >> f;
y = (c * d - a * f) / (b * d - a * e);
if (a) {
x = (c - b * y) / a;
} else {
x = (f - e * y) / d;
}
cout << showpoint << setprecision(3);
cout << setios... | #include <iomanip>
#include <iostream>
using namespace std;
int main() {
double a, b, c, d, e, f, x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
y = (c * d - a * f) / (b * d - a * e);
if (a) {
x = (c - b * y) / a;
} else {
x = (f - e * y) / d;
}
cout << showpoint << setprecisi... | [] | 7,881 | 7,882 | u653894695 | cpp |
p00004 | #include <cstdio>
#include <queue>
#include <vector>
using namespace std;
int main() {
int a, b, c, d, e, f;
double x, y;
while (scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) != EOF) {
x = (double)(c * e - b * f) / (double)(a * e - d * b);
y = (c - a * x) / b;
if (x == -0.0) {
x = 0;
... | #include <cstdio>
#include <queue>
#include <vector>
using namespace std;
int main() {
int a, b, c, d, e, f;
double x, y;
while (scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) != EOF) {
x = (double)(c * e - b * f) / (double)(a * e - d * b);
y = (c - a * x) / b;
if (x == -0.0) {
x = 0;
... | [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 7,883 | 7,884 | u839656264 | cpp |
p00004 | #include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstring>
#include <iostream>
#include <queue>
#include <stack>
#include <string>
#include <vector>
#define FOR(i, b, n) for (int i = b; i < n; i++)
#define CLR(mat) memset(mat, 0, sizeof(mat))
#define INF 1 << 25
using namespace std;... | #include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstring>
#include <iostream>
#include <queue>
#include <stack>
#include <string>
#include <vector>
#define FOR(i, b, n) for (int i = b; i < n; i++)
#define CLR(mat) memset(mat, 0, sizeof(mat))
#define INF 1 << 25
using namespace std;... | [
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add"
] | 7,885 | 7,886 | u012934318 | cpp |
p00004 | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
float a, b, c, d, e, f, x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
y = (d * c - a * f) / (d * b - a * e);
x = (f - e * y) / d;
printf("%0.3f %0.3f \n", x + 0.00000001, y + 0.00000001);
}
} | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
double a, b, c, d, e, f, x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
y = (d * c - a * f) / (d * b - a * e);
x = (c - b * y) / a;
printf("%0.3f %0.3f\n", x + 0.00000001, y + 0.00000001);
}
} | [
"variable_declaration.type.primitive.change",
"expression.operation.binary.change",
"identifier.change",
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 7,887 | 7,888 | u802096158 | cpp |
p00004 | #include <stdio.h>
// ax + by = c
// dx + ey = d
// y = (af-cd)/(ae-bd)
// x = (c-by)/a
int main(void) {
double a, b, c, d, e, f;
while (~scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f)) {
printf("%.3f %.3f", (c - b * ((a * f - c * d) / (a * e - b * d))),
((a * f - c * d) / (a * e - b * d)));
... | #include <stdio.h>
// ax + by = c
// dx + ey = d
// y = (af-cd)/(ae-bd)
// x = (c-by)/a
int main(void) {
double a, b, c, d, e, f;
while (~scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f)) {
printf("%.3f %.3f\n", (c - b * ((a * f - c * d) / (a * e - b * d))) / a,
((a * f - c * d) / (a * e - b * ... | [
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add"
] | 7,892 | 7,893 | u714639016 | cpp |
p00004 | #include <stdio.h>
// ax + by = c
// dx + ey = d
// y = (af-cd)/(ae-bd)
// x = (c-by)/a
int main(void) {
double a, b, c, d, e, f;
while (~scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f)) {
printf("%.3f %.3f\n", (c - b * ((a * f - c * d) / (a * e - b * d))),
((a * f - c * d) / (a * e - b * d)))... | #include <stdio.h>
// ax + by = c
// dx + ey = d
// y = (af-cd)/(ae-bd)
// x = (c-by)/a
int main(void) {
double a, b, c, d, e, f;
while (~scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f)) {
printf("%.3f %.3f\n", (c - b * ((a * f - c * d) / (a * e - b * d))) / a,
((a * f - c * d) / (a * e - b * ... | [
"expression.operation.binary.add"
] | 7,894 | 7,893 | u714639016 | cpp |
p00004 | #include <iostream>
#include <math.h>
double a, b, c, d, e, f;
int main() {
while (std::cin >> a >> b >> c >> d >> e >> f) {
double x = (e * c - b * f) / (a * e - b * d);
double y = (-d * c + a * f) / (a * e - b * d);
printf("%.3f %.3fn", x + (1e-10), y + (1e-10));
}
return 0;
} | #include <iostream>
#include <math.h>
double a, b, c, d, e, f;
int main() {
while (std::cin >> a >> b >> c >> d >> e >> f) {
double x = (e * c - b * f) / (a * e - b * d);
double y = (-d * c + a * f) / (a * e - b * d);
printf("%.3lf %.3lf\n", x + (1e-10), y + (1e-10));
}
return 0;
} | [
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add"
] | 7,895 | 7,896 | u419407022 | cpp |
p00004 | #include <cmath>
#include <cstdio>
double r(double d) {
double a = roundl(d * 1000);
if (a == 0)
return +0.0;
return a / 1000;
}
int main() {
double a, b, c, d, e, f;
while (~scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f))
printf("%.3f %.3f", r((c * e - b * f) / (a * e - b * d)),
... | #include <cmath>
#include <cstdio>
double r(double d) {
double a = roundl(d * 1000);
if (a == 0)
return +0.0;
return a / 1000;
}
int main() {
double a, b, c, d, e, f;
while (~scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f))
printf("%.3f %.3f\n", r((c * e - b * f) / (a * e - b * d)),
... | [
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add"
] | 7,897 | 7,898 | u746184552 | cpp |
p00005 | #include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int main(void) {
int a, b;
cin >> a >> b;
int res = gcd(a, b);
cout << gcd(a, b) << " " << a / res * b << endl;
return 0;
} | #include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int main(void) {
int a, b;
while (cin >> a >> b) {
int res = gcd(a, b);
cout << gcd(a, b) << " " << a / res * b << endl;
}
return 0;
} | [] | 8,277 | 8,278 | u047988051 | cpp |
p00005 | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
int gcd = __gcd(a, b);
cout << gcd << " " << a / gcd * b << endl;
} | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
int gcd = __gcd(a, b);
cout << gcd << " " << a / gcd * b << endl;
}
} | [] | 8,279 | 8,280 | u914140574 | cpp |
p00005 | #include <iostream>
using namespace std;
int func1(int a, int b) {
while (a != b) {
if (a > b)
a -= b;
else
b -= a;
}
return a;
}
int func2(const int a, const int b) {
int a2 = a, b2 = b;
while (a2 != b2) {
if (a2 > b2)
b2 += b;
else
a2 += a;
}
return a2;
}
int m... | #include <iostream>
using namespace std;
int func1(int a, int b) {
while (a != b) {
if (a > b)
a -= b;
else
b -= a;
}
return a;
}
int func2(const int a, const int b) {
int a2 = a, b2 = b;
while (a2 != b2) {
if (a2 > b2)
b2 += b;
else
a2 += a;
}
return a2;
}
int m... | [
"io.output.newline.add"
] | 8,281 | 8,282 | u531888487 | cpp |
p00005 | #include <iostream>
#include <utility>
using namespace std;
int gcn(int a, int b) {
if (a < b) {
swap(a, b);
}
while (b != 0) {
a = a % b;
swap(a, b);
}
return a;
}
int main() {
int n;
int m;
while (cin >> n >> m) {
cout << gcn(n, m) << " " << n * m / gcn(n, m) << endl;
}
return 0... | #include <iostream>
#include <utility>
using namespace std;
int gcn(int a, int b) {
if (a < b) {
swap(a, b);
}
while (b != 0) {
a = a % b;
swap(a, b);
}
return a;
}
int main() {
int n;
int m;
while (cin >> n >> m) {
cout << gcn(n, m) << " " << n / gcn(n, m) * m << endl;
}
return 0... | [
"expression.operation.binary.remove"
] | 8,283 | 8,284 | u178887942 | cpp |
p00005 | #include <algorithm>
#include <iostream>
#include <vector>
int main() {
int a, b, product;
while (std::cin >> a >> b) {
product = a * b;
std::vector<int> v = {a, b};
while (v.at(0) != v.at(1)) {
std::sort(v.begin(), v.end(), std::greater<int>());
v.at(0) = v.at(0) - v.at(1);
}
std::... | #include <algorithm>
#include <iostream>
#include <vector>
int main() {
long int a, b, product;
while (std::cin >> a >> b) {
product = a * b;
std::vector<long int> v = {a, b};
while (v.at(0) != v.at(1)) {
std::sort(v.begin(), v.end(), std::greater<long int>());
v.at(0) = v.at(0) - v.at(1);
... | [
"variable_declaration.type.widen.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 8,285 | 8,286 | u296865446 | cpp |
p00005 | #include <algorithm>
#include <iostream>
#include <vector>
int main() {
int a, b, product;
while (std::cin >> a >> b) {
product = a * b;
std::vector<int> v = {a, b};
while (v.at(0) != v.at(1)) {
std::sort(v.begin(), v.end(), std::greater<int>());
v.at(0) = v.at(0) - v.at(1);
}
std::... | #include <algorithm>
#include <iostream>
#include <vector>
int main() {
long int a, b, product;
while (std::cin >> a >> b) {
product = a * b;
std::vector<long int> v = {a, b};
while (v.at(0) != v.at(1)) {
std::sort(v.begin(), v.end(), std::greater<long int>());
v.at(0) = v.at(0) - v.at(1);
... | [
"variable_declaration.type.widen.change",
"call.arguments.change"
] | 8,287 | 8,286 | u296865446 | cpp |
p00005 | #include <iostream>
#include <vector>
int euclid_alg(const int a, const int b) { return a > b ? a % b : b % a; }
int main(void) {
int a, b;
std::vector<int> num;
while (std::cin >> a >> b) {
num.push_back(a);
num.push_back(b);
}
for (int i = 0; i < (int)num.size(); i += 2) {
int pro = num[i] * ... | #include <iostream>
#include <vector>
long int euclid_alg(const long int a, const long int b) {
return a > b ? a % b : b % a;
}
int main(void) {
long int a, b;
std::vector<long int> num;
while (std::cin >> a >> b) {
num.push_back(a);
num.push_back(b);
}
for (int i = 0; i < (int)num.size(); i += 2... | [
"variable_declaration.type.widen.change"
] | 8,288 | 8,289 | u860183550 | cpp |
p00005 | #include <iostream>
int main() {
long int a, b, r;
while (std::cin >> a >> b) {
long int product = a * b;
// GCD
if (a < b) {
long int temp = a;
a = b;
b = temp;
}
while ((r = a % b) != 0) {
a = b;
b = r;
}
// LCM
long int lcm = product / b;
// ... | #include <iostream>
int main() {
long int a, b, r;
while (std::cin >> a >> b) {
long int product = a * b;
// GCD
if (a < b) {
long int temp = a;
a = b;
b = temp;
}
while ((r = a % b) != 0) {
a = b;
b = r;
}
// LCM
long int lcm = product / b;
// ... | [
"expression.operation.binary.add"
] | 8,291 | 8,292 | u002433243 | cpp |
p00005 | #include <iostream>
//最大公約数を求めるプログラム(m >= n)
int calcGcd(int m, int n);
//最小公倍数を求めるプログラム
inline int calcLcm(int m, int n, int gcd);
int main() {
int gcd, lcm, x, y;
while (std::cin >> x >> y) {
if (x > y)
gcd = calcGcd(x, y);
else
gcd = calcGcd(y, x);
lcm = calcLcm(x, y, gcd);
std::c... | #include <iostream>
//最大公約数を求めるプログラム(m >= n)
int calcGcd(int m, int n);
//最小公倍数を求めるプログラム
inline int calcLcm(int m, int n, int gcd);
int main() {
int gcd, lcm, x, y;
while (std::cin >> x >> y) {
if (x > y)
gcd = calcGcd(x, y);
else
gcd = calcGcd(y, x);
lcm = calcLcm(x, y, gcd);
std::c... | [
"expression.operation.binary.remove"
] | 8,295 | 8,296 | u750086268 | cpp |
p00005 | #include <algorithm>
#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
int main() {
int a, b, c, d;
while (cin >> a >> b) {
c = a;
d = b;
while (1) {
if (a == 0) {
cout << 0 << " " << 0 << endl;
break;
}
if ((max(a, b) % min(a, b)) == 0) {
... | #include <algorithm>
#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
int main() {
int a, b, c, d;
while (cin >> a >> b) {
c = a;
d = b;
while (1) {
if (a == 0) {
cout << 0 << " " << 0 << endl;
break;
}
if ((max(a, b) % min(a, b)) == 0) {
... | [
"expression.operation.binary.remove"
] | 8,297 | 8,298 | u177949486 | cpp |
p00005 | // B.cpp
#include <iostream>
using namespace std;
int gcd(int, int);
int lcm(int, int);
int main(void) {
int a, b;
cin >> a >> b;
cout << gcd(a, b) << " " << lcm(a, b) << endl;
return 0;
}
int gcd(int a, int b) {
int max, min, res;
res = 1;
if (a > b) {
max = a, min = b;
}
if (a < b) {
... | // B.cpp
#include <iostream>
using namespace std;
int gcd(int, int);
int lcm(int, int);
int main(void) {
int a, b;
while (cin >> a >> b) {
cout << gcd(a, b) << " " << lcm(a, b) << endl;
}
return 0;
}
int gcd(int a, int b) {
int max, min, res;
res = 1;
if (a > b) {
max = a, min = b;
}
... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 8,299 | 8,300 | u094497618 | cpp |
p00005 | // B.cpp
#include <iostream>
using namespace std;
int gcd(int, int);
int lcm(int, int);
int main(void) {
int a, b;
cin >> a >> b;
cout << gcd(a, b) << " " << lcm(a, b) << endl;
return 0;
}
int gcd(int a, int b) {
int max, min, res;
res = 1;
if (a > b) {
max = a, min = b;
}
if (a <= b) {
... | // B.cpp
#include <iostream>
using namespace std;
int gcd(int, int);
int lcm(int, int);
int main(void) {
int a, b;
while (cin >> a >> b) {
cout << gcd(a, b) << " " << lcm(a, b) << endl;
}
return 0;
}
int gcd(int a, int b) {
int max, min, res;
res = 1;
if (a > b) {
max = a, min = b;
}
... | [] | 8,301 | 8,300 | u094497618 | cpp |
p00005 | #include <cmath>
#include <stdio.h>
using namespace std;
int lcm(int max, int min) {
int multiplier = 1;
while ((max * multiplier) % min != 0) {
multiplier++;
}
return max * multiplier;
}
int gcd(int max, int min) {
int r = max % min;
int x = min;
while (r != 0) {
int tmp = r;
r = x % r;
... | #include <cmath>
#include <stdio.h>
using namespace std;
int lcm(int max, int min) {
int multiplier = 1;
while ((max * multiplier) % min != 0) {
multiplier++;
}
return max * multiplier;
}
int gcd(int max, int min) {
int r = max % min;
int x = min;
while (r != 0) {
int tmp = r;
r = x % r;
... | [
"identifier.change",
"call.function.change",
"call.arguments.change",
"io.output.change"
] | 8,305 | 8,306 | u411350598 | cpp |
p00005 | #include <stdio.h>
int main(void) {
int a, aa, b, bb, c, s, ss;
while (scanf("%d %d", &a, &b) != EOF) {
aa = a;
bb = b;
if (a < b) {
c = a;
a = b;
b = c;
}
while (1) {
if (a % b == 0) {
break;
} else {
c = a % b;
a = b;
b = c;
}... | #include <stdio.h>
int main(void) {
int a, aa, b, bb, c, s, ss;
while (scanf("%d %d", &a, &b) != EOF) {
aa = a;
bb = b;
if (a < b) {
c = a;
a = b;
b = c;
}
while (1) {
if (a % b == 0) {
break;
} else {
c = a % b;
a = b;
b = c;
}... | [
"expression.operation.binary.remove"
] | 8,307 | 8,308 | u578058364 | cpp |
p00005 | #include <iostream>
using namespace std;
int gcd(int a, int b) {
if (b == 0) {
return a;
}
return gcd(b, a % b);
}
int main() {
int a, b;
cin >> a >> b;
int ans1 = gcd(a, b);
cout << ans1 << " " << a / ans1 * b << endl;
return 0;
} | #include <iostream>
using namespace std;
int gcd(int a, int b) {
if (b == 0) {
return a;
}
return gcd(b, a % b);
}
int main() {
int a, b;
while (cin >> a >> b) {
int ans1 = gcd(a, b);
cout << ans1 << " " << a / ans1 * b << endl;
}
return 0;
} | [] | 8,309 | 8,310 | u113092011 | cpp |
p00005 | #include <iostream>
using namespace std;
int main() {
int a, b, GCD, LCM, c;
while (cin >> a >> b) {
if (a > b) {
c = b;
} else {
c = a;
}
for (int i = 1; i <= (c / 2 + 1); i++) {
if (b % i == 0 && a % i == 0) {
GCD = i;
}
}
if (b % a == 0 || a % b == 0) ... | #include <iostream>
using namespace std;
int main() {
int a, b, GCD, LCM, c;
while (cin >> a >> b) {
if (a > b) {
c = b;
} else {
c = a;
}
for (int i = 1; i <= (c / 2 + 1); i++) {
if (b % i == 0 && a % i == 0) {
GCD = i;
}
}
if (b % a == 0 || a % b == 0) ... | [
"expression.operation.binary.remove"
] | 8,311 | 8,312 | u852311840 | cpp |
p00005 | #include <iostream>
using namespace std;
int main() {
int a, b, c, d, r, s, h;
while (cin >> a >> b) {
// c
h = a;
s = b;
{
r = h % s;
if (r == 0) {
c = s;
break;
}
h = s;
s = r;
}
// d
h = a;
s = b;
if (a < b) {
for (;;) {
... | #include <iostream>
using namespace std;
int main() {
int a, b, c, d, r, s, h;
while (cin >> a >> b) {
// c
h = a;
s = b;
for (;;) {
r = h % s;
if (r == 0) {
c = s;
break;
}
h = s;
s = r;
}
// d
h = a;
s = b;
if (a < b) {
for... | [
"literal.string.change",
"io.output.change"
] | 8,314 | 8,315 | u807440918 | cpp |
p00005 | #include <iostream>
using namespace std;
int main() {
int a, b, c, d, r, s, h;
while (cin >> a >> b) {
// c
h = a;
s = b;
{
r = h % s;
if (r == 0) {
c = s;
break;
}
h = s;
s = r;
}
// d
h = a;
s = b;
if (a < b) {
for (;;) {
... | #include <iostream>
using namespace std;
int main() {
int a, b, c, d, r, s, h;
while (cin >> a >> b) {
// c
h = a;
s = b;
for (;;) {
r = h % s;
if (r == 0) {
c = s;
break;
}
h = s;
s = r;
}
// d
h = a;
s = b;
if (a < b) {
for... | [] | 8,316 | 8,315 | u807440918 | cpp |
p00005 | #include <iostream>
using namespace std;
int main() {
int a, b, m, n, tmp;
while (cin >> a >> b) {
if (a > b) {
m = a;
n = b;
} else {
m = b;
n = a;
}
while (n != 0) {
tmp = n;
n = m % n;
m = tmp;
}
tmp = a * b / m;
cout << m << " " << tmp << end... | #include <iostream>
using namespace std;
int main() {
long long int a, b, m, n, tmp;
while (cin >> a >> b) {
if (a > b) {
m = a;
n = b;
} else {
m = b;
n = a;
}
while (n != 0) {
tmp = n;
n = m % n;
m = tmp;
}
tmp = a * b / m;
cout << m << " " << ... | [
"variable_declaration.type.widen.change"
] | 8,317 | 8,318 | u925102652 | cpp |
p00005 | #include <cstdio>
using namespace std;
int gcd(int a, int b) {
if (b == 0)
return a;
return gcd(b, a - (a / b) * b);
}
int main() {
int a, b;
int g, l;
int tmp;
if (!(scanf("%d %d", &a, &b) == EOF)) {
g = gcd(a, b);
l = a / g * b;
printf("%d %d", g, l);
}
} | #include <cstdio>
using namespace std;
int gcd(int a, int b) {
if (b == 0)
return a;
return gcd(b, a - (a / b) * b);
}
int main() {
int a, b;
int g, l;
int tmp;
while (!(scanf("%d %d", &a, &b) == EOF)) {
g = gcd(a, b);
l = a / g * b;
printf("%d %d\n", g, l);
}
} | [
"control_flow.branch.while.replace.add",
"control_flow.loop.if.replace.remove",
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add"
] | 8,320 | 8,321 | u622012299 | cpp |
p00005 | /*
*AOJ0005 GCD and LCM
**問題
[http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0005&lang=jp]
*/
#include <algorithm>
#include <cmath>
#include <fstream>
#include <iostream>
#include <queue>
#include <utility>
#include <vector>
using namespace std;
int gcd(int a, int b) {
if (b == 0)
return a;
return gc... | #include <algorithm>
#include <cmath>
#include <fstream>
#include <iostream>
#include <queue>
#include <utility>
#include <vector>
using namespace std;
int gcd(int a, int b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
int main() {
int a, b, g;
long long l;
while (cin >> a >> b) {
g = gcd(a, b);
... | [
"assignment.change"
] | 8,322 | 8,323 | u329400409 | cpp |
p00005 | #include <iostream>
using namespace std;
int main() {
int a, b, gcd, lcm, tmp, r, num_a, num_b;
while (cin >> num_a >> num_b) {
a = num_a, b = num_b;
if (a < b) {
tmp = a;
a = b;
b = tmp;
}
r = a % b;
while (r != 0) {
a = b;
b = r;
r = a % b;
}
gcd = b... | #include <iostream>
using namespace std;
int main() {
long long int a, b, gcd, lcm, tmp, r, num_a, num_b;
while (cin >> num_a >> num_b) {
a = num_a;
b = num_b;
if (a < b) {
tmp = a;
a = b;
b = tmp;
}
r = a % b;
while (r != 0) {
a = b;
b = r;
r = a % b;
... | [
"variable_declaration.type.widen.change"
] | 8,324 | 8,325 | u393312973 | cpp |
p00005 | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
long gcd(int m, int n) {
if ((0 == m) || (0 == n))
return 0;
while (m != n) {
if (m > n)
m = m - n;
else
n = n - m;
}
return m;
}
long lcm(int m, int n) {
if ((0 == m) || (0 == n))
return 0;
return ... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
long long gcd(int m, int n) {
if ((0 == m) || (0 == n))
return 0;
while (m != n) {
if (m > n)
m = m - n;
else
n = n - m;
}
return m;
}
long long lcm(int m, int n) {
if ((0 == m) || (0 == n))
return 0;... | [
"variable_declaration.type.widen.change",
"control_flow.loop.for.condition.change"
] | 8,326 | 8,327 | u915343634 | cpp |
p00005 | //#define _GRIBCXX_DEBUG
#include <algorithm>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <memory>
#... | //#define _GRIBCXX_DEBUG
#include <algorithm>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <memory>
#... | [
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.add"
] | 8,328 | 8,329 | u915343634 | cpp |
p00005 | #include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
int c;
while (b != 0) {
c = a % b;
a = b;
b = c;
}
return (a);
}
int lcm(int a, int b) {
if (a == 0 || b == 0)
return (0);
return ((a / gcd(a, b)) * b);
}
int main() {
int a, b;
cin >> a >> b;
cout << gcd(a, b) <<... | #include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
int c;
while (b != 0) {
c = a % b;
a = b;
b = c;
}
return (a);
}
int lcm(int a, int b) {
if (a == 0 || b == 0)
return (0);
return ((a / gcd(a, b)) * b);
}
int main() {
int a, b;
while (cin >> a >> b) {
cout << g... | [] | 8,330 | 8,331 | u603777231 | cpp |
p00005 | #include <iomanip>
#include <iostream>
using namespace std;
double eucAlg(int a, int b);
int main(int argc, char *argv[]) {
double a, b; //??\??????
double c, d; //??????
cin >> a >> b;
c = eucAlg(a, b);
d = a * b / c;
cout << fixed << setprecision(0) << c << " " << d << endl;
return 0;
}
//???????... |
#include <iomanip>
#include <iostream>
using namespace std;
double eucAlg(int a, int b);
int main(int argc, char *argv[]) {
double a, b; //??\??????
double c, d; //??????
while (cin >> a >> b) {
c = eucAlg(a, b);
d = a * b / c;
cout << fixed << setprecision(0) << c << " " << d << endl;
}
ret... | [] | 8,332 | 8,333 | u841770308 | cpp |
p00005 | #include <iostream>
using namespace std;
int main() {
long long a, b, GCD, LCM, x, a2, b2;
cin >> a >> b;
a2 = a;
b2 = b;
while (a != b) {
if (a > b) {
x = a - b;
a = b;
b = x;
} else if (b > a) {
x = b - a;
b = a;
a = x;
}
}
GCD = a;
LCM = a2 * b2 / a;
... | #include <iostream>
using namespace std;
int main() {
long long a, b, GCD, LCM, x, a2, b2;
while (cin >> a >> b) {
a2 = a;
b2 = b;
while (a != b) {
if (a > b) {
x = a - b;
a = b;
b = x;
} else if (b > a) {
x = b - a;
b = a;
a = x;
}
... | [] | 8,334 | 8,335 | u905165344 | cpp |
p00005 | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int a, b, m, tmp_a, tmp_b;
while (cin >> a >> b) {
tmp_a = a;
tmp_b = b;
while (tmp_a != 0 && tmp_b != 0) {
if (tmp_a > tmp_b) {
tmp_a = tmp_a % tmp_b;
} else {
tmp_b = tmp_b % tmp_a;
}
}
m ... | #include <cstdio>
#include <iostream>
using namespace std;
int main() {
int a, b, m, tmp_a, tmp_b;
while (cin >> a >> b) {
tmp_a = a;
tmp_b = b;
while (tmp_a != 0 && tmp_b != 0) {
if (tmp_a > tmp_b) {
tmp_a = tmp_a % tmp_b;
} else {
tmp_b = tmp_b % tmp_a;
}
}
m ... | [
"expression.operation.binary.remove"
] | 8,336 | 8,337 | u873028431 | cpp |
p00005 | #include <iostream>
using namespace std;
int get_gcd(int a, int b) {
if (a % b == 0)
return b;
return get_gcd(b, a % b);
}
int main() {
int a, b;
while (cin >> a >> b) {
if (a < b) {
int tmp = a;
a = b;
b = tmp;
}
int gcd = get_gcd(a, b);
int lcm = (a * b) / gcd;
co... | #include <iostream>
using namespace std;
int get_gcd(int a, int b) {
if (a % b == 0)
return b;
return get_gcd(b, a % b);
}
int main() {
int a, b;
while (cin >> a >> b) {
if (a < b) {
int tmp = a;
a = b;
b = tmp;
}
int gcd = get_gcd(a, b);
int lcm = a / gcd * b;
cout... | [
"assignment.change"
] | 8,338 | 8,339 | u379744035 | cpp |
p00005 | #include <algorithm>
#include <cmath>
#include <iostream>
using namespace std;
long long int find_GCD(long long int a, long long int b) {
long long int max = 0;
for (int i = min(a, b); i > 0; i--) {
if (a % i == 0 && b % i == 0) {
max = i;
break;
}
}
return max;
}
long long int find_LCM(l... | #include <algorithm>
#include <cmath>
#include <iostream>
using namespace std;
long long int find_GCD(long long int a, long long int b) {
long long int max = 0;
for (int i = min(a, b); i > 0; i--) {
if (a % i == 0 && b % i == 0) {
max = i;
break;
}
}
return max;
}
long long int find_LCM(l... | [
"control_flow.break.remove",
"control_flow.return.add",
"function.return_value.change"
] | 8,340 | 8,341 | u876508046 | cpp |
p00005 | #include <iostream>
using namespace std;
long long int gcd(long long int m, long long int n) {
if (n == 0)
return m;
return gcd(n, m % n);
}
int main() {
long long int a, b;
while (cin >> a >> b)
cout << gcd(a, b) << a * b / gcd(a, b) << endl;
return 0;
} | #include <iostream>
using namespace std;
long long int gcd(long long int m, long long int n) {
if (n == 0)
return m;
return gcd(n, m % n);
}
int main() {
long long int a, b;
while (cin >> a >> b)
cout << gcd(a, b) << " " << a * b / gcd(a, b) << endl;
return 0;
} | [
"io.output.change"
] | 8,342 | 8,343 | u527286045 | cpp |
p00005 | #include <cstdio>
#include <iostream>
using namespace std;
int a, b;
int gcd, lcm;
void GCD() {
int big, small;
big = a;
small = b;
while (big) {
if (small > big)
swap(big, small);
big = big % small;
}
gcd = small;
}
void LCM() { lcm = a * b / gcd; }
int main() {
while (cin >> a >> b... | #include <cstdio>
#include <iostream>
using namespace std;
long long a, b;
int gcd, lcm;
void GCD() {
int big, small;
big = a;
small = b;
while (big) {
if (small > big)
swap(big, small);
big = big % small;
}
gcd = small;
}
void LCM() { lcm = a * b / gcd; }
int main() {
while (cin >> ... | [
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 8,344 | 8,345 | u281184198 | cpp |
p00005 | #include <cstdio>
#include <iostream>
using namespace std;
int a, b;
int gcd, lcm;
void GCD() {
int big, small;
big = a;
small = b;
while (big) {
if (small > big)
swap(big, small);
big = big % small;
}
gcd = small;
}
void LCM() { lcm = a * b / gcd; }
int main() {
while (cin >> a >> b... | #include <cstdio>
#include <iostream>
using namespace std;
long long a, b;
long long int gcd, lcm;
void GCD() {
int big, small;
big = a;
small = b;
while (big) {
if (small > big)
swap(big, small);
big = big % small;
}
gcd = small;
}
void LCM() { lcm = a * b / gcd; }
int main() {
whil... | [
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 8,344 | 8,346 | u281184198 | cpp |
p00005 | #include <cstdio>
#include <iostream>
using namespace std;
int a, b;
int gcd, lcm;
void GCD() {
int big, small;
big = a;
small = b;
while (big) {
if (small > big)
swap(big, small);
big = big % small;
}
gcd = small;
}
void LCM() { lcm = a * b / gcd; }
int main() {
while (cin >> a >> b... | #include <cstdio>
#include <iostream>
using namespace std;
long int a, b;
long int gcd, lcm;
void GCD() {
int big, small;
big = a;
small = b;
while (big) {
if (small > big)
swap(big, small);
big = big % small;
}
gcd = small;
}
void LCM() { lcm = a * b / gcd; }
int main() {
while (cin... | [
"variable_declaration.type.widen.change"
] | 8,344 | 8,347 | u281184198 | cpp |
p00005 | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
cout << a * b / (a / __gcd(a, b) * b) << " " << a / __gcd(a, b) * b << endl;
}
} | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
long long int a, b;
while (cin >> a >> b) {
cout << a * b / (a / __gcd(a, b) * b) << " " << a / __gcd(a, b) * b << endl;
}
} | [
"variable_declaration.type.widen.change"
] | 8,349 | 8,350 | u281184198 | cpp |
p00005 | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a, b;
while (cin >> a >> b) {
cout << a * b / (a / __gcd(a, b) * b) << " " << a / __gcd(a, b) * b << endl;
}
} | #include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
long int a, b;
while (cin >> a >> b) {
/*cout << __gcd(a, b) << " " << a * b / gcd(a, b) << endl;*/
cout << a * b / (a / __gcd(a, b) * b) << " " << a / __gcd(a, b) * b << endl;
}
} | [
"variable_declaration.type.widen.change"
] | 8,349 | 8,351 | u281184198 | cpp |
p00005 | #include <cstdio>
#include <iostream>
using namespace std;
int a, b;
int gcd, lcm;
void GCD() {
int big, small;
big = a;
small = b;
while (big) {
if (small > big)
swap(big, small);
big = big % small;
}
gcd = small;
}
void LCM() { lcm = a * b / gcd; }
int main() {
while (cin >> a >> b... | #include <cstdio>
#include <iostream>
using namespace std;
int a, b;
int gcd, lcm;
void GCD() {
int big, small;
big = a;
small = b;
while (big) {
if (small > big)
swap(big, small);
big = big % small;
}
gcd = small;
}
void LCM() { lcm = a / gcd * b; }
int main() {
while (cin >> a >> b... | [
"expression.operation.binary.remove"
] | 8,344 | 8,352 | u281184198 | cpp |
p00005 | #include <algorithm>
#include <iostream>
using namespace std;
int main(void) {
int x, y, g, l, t;
while (cin >> x >> y) {
if (x < y)
swap(x, y);
g = __gcd(x, y);
l = x * y / g;
cout << g << " " << l << endl;
}
return 0;
} | #include <algorithm>
#include <iostream>
using namespace std;
int main(void) {
long long int x, y, g, l, t;
while (cin >> x >> y) {
if (x < y)
swap(x, y);
g = __gcd(x, y);
l = x * y / g;
cout << g << " " << l << endl;
}
return 0;
} | [
"variable_declaration.type.widen.change"
] | 8,356 | 8,357 | u505651850 | cpp |
p00005 | #include <algorithm>
#include <iostream>
using namespace std;
int gcd(int m, int n) {
if (n == 0)
return m;
return gcd(n, m % n);
}
int lcm(int m, int n) { return ((m * n) / gcd(m, n)); }
int main() {
int m, n;
while (cin >> m >> n) {
cout << gcd(m, n) << " " << lcm(m, n) << endl;
}
return 0;
... | #include <algorithm>
#include <iostream>
using namespace std;
int gcd(int m, int n) {
if (n == 0)
return m;
return gcd(n, m % n);
}
int lcm(int m, int n) { return ((m / gcd(m, n)) * n); }
int main() {
int m, n;
while (cin >> m >> n) {
cout << gcd(m, n) << " " << lcm(m, n) << endl;
}
return 0;
... | [] | 8,358 | 8,359 | u684890004 | cpp |
p00005 | #include <cmath>
#include <iostream>
using namespace std;
long long a, b;
long long gcd(long long x, long long y) {
if (b == 0)
return x;
else
return gcd(y, x % y);
}
long long lcm(long long x, long long y) { return (x * y) / gcd(x, y); }
int main() {
while (cin >> a >> b) {
cout << gcd(a, b) << " ... | #include <cmath>
#include <iostream>
using namespace std;
long long a, b;
long long gcd(long long x, long long y) {
if (y == 0)
return x;
else
return gcd(y, x % y);
}
long long lcm(long long x, long long y) { return (x * y) / gcd(x, y); }
int main() {
while (cin >> a >> b) {
cout << gcd(a, b) << " ... | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 8,360 | 8,361 | u403618837 | cpp |
p00005 | #include <iostream>
using namespace std;
int main() {
int a, b, r, g, l;
while (cin >> a >> b) {
l = a * b;
if (a < b)
swap(a, b);
do {
r = a % b;
a = b;
b = r;
} while (r);
g = a;
l /= g;
cout << g << ' ' << l << endl;
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
long long a, b, r, g, l;
while (cin >> a >> b) {
l = a * b;
if (a < b)
swap(a, b);
do {
r = a % b;
a = b;
b = r;
} while (r);
g = a;
l /= g;
cout << g << ' ' << l << endl;
}
return 0;
} | [
"variable_declaration.type.primitive.change",
"variable_declaration.type.widen.change"
] | 8,362 | 8,363 | u022810433 | cpp |
p00005 | #include <iostream>
using namespace std;
int main() {
int a, b, big, small, r;
while (1) {
cin >> a >> b;
if (cin.eof()) {
break;
}
if (a > b) {
big = a;
small = b;
} else {
big = b;
small = a;
}
r = big % small;
while (r != 0) {
big = small;
... | #include <iostream>
using namespace std;
int main() {
int a, b, big, small, r;
while (1) {
cin >> a >> b;
if (cin.eof()) {
break;
}
if (a > b) {
big = a;
small = b;
} else {
big = b;
small = a;
}
r = big % small;
while (r != 0) {
big = small;
... | [] | 8,366 | 8,367 | u990876498 | cpp |
p00005 | #include <iostream>
using namespace std;
int gcd(int x, int y) {
if (x % y == 0)
return y;
else {
int z = x % y;
return gcd(y, z);
}
}
int main() {
int a, b;
int g;
long int l;
while (cin >> a >> b) {
if (a > b)
g = gcd(a, b);
else if (a < b)
g = gcd(b, a);
else
... | #include <iostream>
using namespace std;
int gcd(int x, int y) {
if (x % y == 0)
return y;
else {
int z = x % y;
return gcd(y, z);
}
}
int main() {
int a, b;
int g;
long int l;
while (cin >> a >> b) {
if (a > b)
g = gcd(a, b);
else if (a < b)
g = gcd(b, a);
else
... | [
"type_conversion.add"
] | 8,369 | 8,370 | u252365561 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.