buggy_code
stringlengths 11
625k
| fixed_code
stringlengths 17
625k
| bug_type
stringlengths 2
4.45k
| language
int64 0
8
| token_count
int64 5
200k
| change_count
int64 0
100
|
|---|---|---|---|---|---|
def judge(lists):
lists.sort()
if lists[0] ** 2 + lists[1] ** 2 - lists[2] ** 2:
return False
else:
return True
def run():
N = int(input())
for _ in range(N):
if judge([int(x) for x in input().split()]):
print("Yes")
else:
print("NO")
if __name__ == '__main__':
run()
|
def judge(lists):
lists.sort()
if lists[0] ** 2 + lists[1] ** 2 - lists[2] ** 2:
return False
else:
return True
def run():
N = int(input())
for _ in range(N):
if judge([int(x) for x in input().split()]):
print("YES")
else:
print("NO")
if __name__ == '__main__':
run()
|
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
| 5
| 105
| 2
|
#!/usr/bin/env python
# coding: utf-8
def is_right_triangle(a, b, c):
return a ** 2 + b ** 2 == c ** 2
def main():
input_count = int(input())
for i in range(input_count):
L = input().split(" ")
L = sorted(map(int, L))
print(("N0", "YES")[is_right_triangle(*L)])
if __name__ == '__main__':
main()
|
#!/usr/bin/env python
# coding: utf-8
def is_right_triangle(a, b, c):
return a ** 2 + b ** 2 == c ** 2
def main():
input_count = int(input())
for i in range(input_count):
L = input().split(" ")
L = sorted(map(int, L))
print(("NO", "YES")[is_right_triangle(*L)])
if __name__ == '__main__':
main()
|
[["-", 3, 4, 0, 206, 51, 660, 0, 557, 0, 6], ["+", 3, 4, 0, 206, 51, 660, 0, 557, 0, 6]]
| 5
| 97
| 2
|
while True:
try:
list = sorted([int(item) for item in input().split()])
if list[0] ** 2 + list[1] ** 2 == list[2] ** 2 :
print('YES')
else :
print('NO')
except EOFError:
break
|
while True:
try:
list = sorted([int(item) for item in input().split()])
if list[0] ** 2 + list[1] ** 2 == list[2] ** 2 :
print('YES')
else :
print('NO')
except EOFError:
break
except IndexError:
continue
|
[["+", 0, 52, 8, 196, 0, 246, 0, 671, 0, 672], ["+", 0, 52, 8, 196, 0, 246, 0, 671, 0, 22], ["+", 0, 52, 8, 196, 0, 246, 0, 671, 0, 102], ["+", 0, 246, 0, 671, 0, 196, 0, 116, 0, 117]]
| 5
| 66
| 4
|
for n in range(eval(input())):
a,b,c=sorted(map(int,input().split()))
print(["YES","NO"][c*c-a*a-b*b])
|
for n in range(eval(input())):
a,b,c=sorted(map(int,input().split()))
print(["NO","YES"][c*c-a*a-b*b==0])
|
[["-", 3, 4, 0, 206, 51, 634, 0, 557, 0, 6], ["+", 3, 4, 0, 206, 51, 634, 0, 557, 0, 6], ["+", 0, 652, 3, 4, 0, 206, 206, 666, 667, 60], ["+", 0, 652, 3, 4, 0, 206, 206, 666, 0, 612]]
| 5
| 59
| 8
|
for n in range(eval(input())):
a,b,c=sorted(map(int,input().split()))
print(["YES","NO"][c*c-a*a-b*b])
|
for n in range(eval(input())):
a,b,c=sorted(map(int,input().split()))
print(["NO","YES"][c*c==a*a+b*b])
|
[["-", 3, 4, 0, 206, 51, 634, 0, 557, 0, 6], ["+", 3, 4, 0, 206, 51, 634, 0, 557, 0, 6], ["-", 3, 4, 0, 206, 206, 657, 31, 657, 17, 33], ["+", 0, 652, 3, 4, 0, 206, 206, 666, 667, 60], ["-", 0, 652, 3, 4, 0, 206, 206, 657, 17, 33], ["+", 3, 4, 0, 206, 206, 666, 0, 657, 17, 72]]
| 5
| 59
| 8
|
n = int(input())
for i in range(n):
a, b, c = map(int, input().strip().split())
print('YES' if a**2 + b**2 == c**2 else 'NO')
|
n = int(input())
for i in range(n):
a, b, c = sorted(map(int, input().strip().split()))
print('YES' if a**2 + b**2 == c**2 else 'NO')
|
[["+", 8, 196, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
| 5
| 60
| 3
|
#include <stdio.h>
int main(void) {
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) / (a * e - b * d);
y = (double)(c * d - a * f) / (b * d - a * e);
if (x <= 0) {
x = 0;
printf("%0.3f %0.3f\n", x, y);
} else {
printf("%0.3f %0.3f\n", x, y);
}
}
return 0;
}
|
#include <stdio.h>
int main(void) {
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) / (a * e - b * d);
y = (double)(c * d - a * f) / (b * d - a * e);
if (x == 0) {
x = 0;
printf("%0.3f %0.3f\n", x, y);
} else {
printf("%0.3f %0.3f\n", x, y);
}
}
return 0;
}
|
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60]]
| 1
| 150
| 2
|
#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 x = (c * e - b * f) / (a * e - b * d);
double y = (a * f - c * d) / (a * e - b * d);
if (x == 0)
x = 0;
if (y == 0)
y == 0;
printf("%.6f %.6f\n", x, y);
}
return 0;
}
|
#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 x = (c * e - b * f) / (a * e - b * d);
double y = (a * f - c * d) / (a * e - b * d);
if (x == 0)
x = 0;
if (y == 0)
y == 0;
printf("%.3f %.3f\n", x, y);
}
return 0;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 1
| 126
| 2
|
#include <iomanip>
#include <iostream>
using namespace std;
int main() {
int a, b, c, d, e, f;
while (cin >> a >> b >> c >> d >> e >> f) {
double x, y;
y = (a * f - c * d) / (a * e - b * d);
x = (c - b * y) / a;
cout << fixed << setprecision(3);
cout << x << " " << y << endl;
}
return 0;
}
|
#include <iomanip>
#include <iostream>
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 - c * d) / (a * e - b * d);
x = (c - b * y) / a;
cout << fixed << setprecision(3);
cout << x << " " << y << endl;
}
return 0;
}
|
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
| 1
| 108
| 2
|
#include <iomanip>
#include <iostream>
int main() {
double a, b, c, d, e, f, a_, b_, c_, d_, e_, f_;
double x, y;
double in;
while (std::cin >> a >> b >> c >> d >> e >> f) {
in = (a * e - b * d);
a_ = e / in;
b_ = -1 * b / in;
d = -1 * d / in;
e_ = a / in;
x = c * a_ + f * b_;
y = c * d_ + f * e_;
std::cout << std::setprecision(3) << std::fixed << x << ' '
<< std::setprecision(3) << std::fixed << y << std::endl;
}
return 0;
}
|
#include <iomanip>
#include <iostream>
int main() {
double a, b, c, d, e, f, a_, b_, c_, d_, e_, f_;
double x, y;
double in;
while (std::cin >> a >> b >> c >> d >> e >> f) {
in = (a * e - b * d);
a_ = e / in;
b_ = -1 * b / in;
d_ = -1 * d / in;
e_ = a / in;
x = c * a_ + f * b_;
y = c * d_ + f * e_;
std::cout << std::setprecision(3) << std::fixed << x << ' '
<< std::setprecision(3) << std::fixed << y << std::endl;
}
return 0;
}
|
[["-", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22]]
| 1
| 164
| 2
|
#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;
if (y == 0)
y = 0;
cout << fixed << setprecision(3) << x << " " << y << "\n";
}
}
|
#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)
y = 0;
cout << fixed << setprecision(3) << x << " " << y << "\n";
}
}
|
[["-", 36, 36, 36, 36, 0, 30, 0, 135, 136, 137], ["-", 36, 36, 36, 36, 0, 30, 0, 135, 0, 138], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
| 1
| 138
| 4
|
#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 = (b[2] - b[1] * c) / b[1];
a[2] = d;
b[2] = d;
} else {
double c = 1;
if (b[0] != 0) {
c = a[0] / b[0];
b[1] = b[1] * c - a[1];
b[2] = b[2] * c - a[2];
}
b[2] /= b[1];
b[1] = 1;
a[2] -= b[2] * a[1];
a[2] /= a[0];
}
if (a[2] < 0.0001 && a[2] > -0.0001)
a[2] = 0.000;
if (b[2] < 0.0001 && b[2] > -0.0001)
b[2] = 0.000;
cout << fixed << setprecision(3) << a[2] << b[2] << endl;
}
return 0;
}
|
#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 = (b[2] - b[1] * c) / b[1];
a[2] = d;
b[2] = d;
} else {
double c = 1;
if (b[0] != 0) {
c = a[0] / b[0];
b[1] = b[1] * c - a[1];
b[2] = b[2] * c - a[2];
}
b[2] /= b[1];
b[1] = 1;
a[2] -= b[2] * a[1];
a[2] /= a[0];
}
if (a[2] < 0.0001 && a[2] > -0.0001)
a[2] = 0.000;
if (b[2] < 0.0001 && b[2] > -0.0001)
b[2] = 0.000;
cout << fixed << setprecision(3) << a[2] << " " << b[2] << endl;
}
return 0;
}
|
[["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151]]
| 1
| 308
| 4
|
#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);
}
}
|
[["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
| 1
| 117
| 1
|
#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)) / 1000;
printf("%.3lf %.3lf\n", x, y);
}
return 0;
}
|
#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)) / 1000.0;
printf("%.3lf %.3lf\n", x, y);
}
return 0;
}
|
[["-", 0, 11, 12, 16, 31, 23, 0, 16, 31, 22], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 31, 22], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]]
| 1
| 129
| 6
|
//
// 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(false);
float e[10000][6];
int n = 0;
float x[10000], y[10000];
while (cin >> e[n][0] >> e[n][1] >> e[n][2] >> e[n][3] >> e[n][4] >>
e[n][5]) {
float d = e[n][0] * e[n][4] - e[n][1] * e[n][3];
x[n] = (e[n][4] * e[n][2] - e[n][1] * e[n][5]) / d;
y[n] = (0 - e[n][3] * e[n][2] + e[n][0] * e[n][5]) / d;
// printf("d: %f, x: %.4f, y: %.4f\n", d, x[n], y[n]);
n++;
}
for (int i = 0; i < n; i++) {
if (x[i] == -0) {
x[i] = 0;
}
if (y[i] == -0) {
y[i] = 0;
}
printf("%.4f %.4f\n", x[i], y[i]);
}
return 0;
}
|
//
// 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(false);
float e[10000][6];
int n = 0;
float x[10000], y[10000];
while (cin >> e[n][0] >> e[n][1] >> e[n][2] >> e[n][3] >> e[n][4] >>
e[n][5]) {
float d = e[n][0] * e[n][4] - e[n][1] * e[n][3];
x[n] = (e[n][4] * e[n][2] - e[n][1] * e[n][5]) / d;
y[n] = (0 - e[n][3] * e[n][2] + e[n][0] * e[n][5]) / d;
// printf("d: %f, x: %.4f, y: %.4f\n", d, x[n], y[n]);
n++;
}
for (int i = 0; i < n; i++) {
if (x[i] == -0) {
x[i] = 0;
}
if (y[i] == -0) {
y[i] = 0;
}
printf("%.3f %.3f\n", x[i], y[i]);
}
return 0;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 1
| 324
| 2
|
#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 == -0.000) {
y = 0.000;
}
a3 = a1 * e1;
c3 = c1 * e1;
d3 = b1 * d1;
f3 = b1 * f1;
x = (c3 - f3) / (a3 - d3);
if (x == -0.000) {
x = 0.000;
}
cout << fixed << setprecision(3) << x;
cout << " ";
cout << fixed << setprecision(3) << y;
}
return 0;
}
|
#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 == -0.000) {
y = 0.000;
}
a3 = a1 * e1;
c3 = c1 * e1;
d3 = b1 * d1;
f3 = b1 * f1;
x = (c3 - f3) / (a3 - d3);
if (x == -0.000) {
x = 0.000;
}
cout << fixed << setprecision(3) << x;
cout << " ";
cout << fixed << setprecision(3) << y << endl;
}
return 0;
}
|
[["+", 0, 7, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 7, 8, 9, 0, 1, 0, 16, 12, 22]]
| 1
| 197
| 2
|
/* 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 >> f) {
x = (double)(c * e - f * b) / (a * e - d * b);
y = (double)(c * d - f * a) / (b * d - e * a);
if (x > -0.001 && y > -0.001)
printf("%.3lf %.3lf\n", abs(x), abs(y));
else if (x > -0.001)
printf("%.3lf %.3lf\n", abs(x), y);
else if (y > -0.001)
printf("%.3lf %.3lf\n", x, abs(y));
else
printf("%.3lf %.3lf", x, y);
}
return 0;
}
|
/* 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 >> f) {
x = (double)(c * e - f * b) / (a * e - d * b);
y = (double)(c * d - f * a) / (b * d - e * a);
if (x > -0.001 && y > -0.001)
printf("%.3lf %.3lf\n", abs(x), abs(y));
else if (x > -0.001)
printf("%.3lf %.3lf\n", abs(x), y);
else if (y > -0.001)
printf("%.3lf %.3lf\n", x, abs(y));
else
printf("%.3lf %.3lf\n", x, y);
}
return 0;
}
|
[["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
| 1
| 189
| 1
|
/*
????????°??§???????????¨????????????
*/
#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 LLU unsigned long long int
#define LL long long int
#define LD long double
using namespace std;
#define LLUmax ULLONG_MAX
#define LLmax LLONG_MAX
#define dmax INT_MAX
#define vd vector<int>
#define vLL vector<long long int>
#define vLLU vector<unsigned long long int>
#define pb push_back
#define mp make_pair
#define fi first
#define sec second
#define debug printf("asd\n")
#define debugd(a) printf("--%d\n", a)
#define debugdd(a, b) printf("--%d %d\n", a, b)
#define debugarr(a, b) \
for (int i = 0; i < b; i++) \
printf("%d ", a[i]); \
printf("\n")
#define newline printf("\n")
#define forin(a, b, c) for (int a = b; a < c; a++)
#define forde(a, b, c) for (int a = b; a < c; a--)
inline void scd(int &a) { scanf("%d", &a); }
inline void scdd(int &a, int &b) { scanf("%d %d", &a, &b); }
inline void sctd(int &a, int &b, int &c) { scanf("%d %d %d", &a, &b, &c); }
inline void scdlld(long int &a, long int &b) { scanf("%I64d %I64d", &a, &b); }
inline void sclld(long long int &a) { scanf("%I64d", &a); }
#define scarrd(a, b) \
for (int index = 0; index < b; index++) \
scanf("%d", &a[index])
#define prdlld(a, b) printf("%I64d %I64d", a, b)
#define prdd(a, b) printf("%d %d", a, b)
#define prd(a) printf("%d", a)
#define prarr(a, b) \
for (int i = 0; i < b; i++) \
printf("%d ", a[i])
#define iniarr(a, b) \
for (int i = 0; i < b; i++) \
a[i] = 0
#define arr(a, b) int *a = (int *)malloc(b * sizeof(int))
#define llarr(a, b) \
long long int *a = (long long int *)malloc(b * sizeof(long long int))
#define st(a, b) char *a = (char *)malloc(b * sizeof(char))
#define grav 9.8
#define pi 3.14159265
int main() {
float a, b, c, d, e, f;
while (scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f) != EOF) {
double x, y;
y = ((f * a) - (d * c)) / ((a * e) - (d * b));
x = (c - (b * y)) / a;
printf("%.3Lf %.3Lf\n", x, y);
}
return 0;
}
|
/*
????????°??§???????????¨????????????
*/
#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 LLU unsigned long long int
#define LL long long int
#define LD long double
using namespace std;
#define LLUmax ULLONG_MAX
#define LLmax LLONG_MAX
#define dmax INT_MAX
#define vd vector<int>
#define vLL vector<long long int>
#define vLLU vector<unsigned long long int>
#define pb push_back
#define mp make_pair
#define fi first
#define sec second
#define debug printf("asd\n")
#define debugd(a) printf("--%d\n", a)
#define debugdd(a, b) printf("--%d %d\n", a, b)
#define debugarr(a, b) \
for (int i = 0; i < b; i++) \
printf("%d ", a[i]); \
printf("\n")
#define newline printf("\n")
#define forin(a, b, c) for (int a = b; a < c; a++)
#define forde(a, b, c) for (int a = b; a < c; a--)
inline void scd(int &a) { scanf("%d", &a); }
inline void scdd(int &a, int &b) { scanf("%d %d", &a, &b); }
inline void sctd(int &a, int &b, int &c) { scanf("%d %d %d", &a, &b, &c); }
inline void scdlld(long int &a, long int &b) { scanf("%I64d %I64d", &a, &b); }
inline void sclld(long long int &a) { scanf("%I64d", &a); }
#define scarrd(a, b) \
for (int index = 0; index < b; index++) \
scanf("%d", &a[index])
#define prdlld(a, b) printf("%I64d %I64d", a, b)
#define prdd(a, b) printf("%d %d", a, b)
#define prd(a) printf("%d", a)
#define prarr(a, b) \
for (int i = 0; i < b; i++) \
printf("%d ", a[i])
#define iniarr(a, b) \
for (int i = 0; i < b; i++) \
a[i] = 0
#define arr(a, b) int *a = (int *)malloc(b * sizeof(int))
#define llarr(a, b) \
long long int *a = (long long int *)malloc(b * sizeof(long long int))
#define st(a, b) char *a = (char *)malloc(b * sizeof(char))
#define grav 9.8
#define pi 3.14159265
int main() {
float a, b, c, d, e, f;
while (scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f) != EOF) {
float x, y;
y = ((f * a) - (d * c)) / ((a * e) - (d * b));
x = (c - (b * y)) / a;
printf("%.3f %.3f\n", x, y);
}
return 0;
}
|
[["-", 8, 9, 0, 52, 8, 9, 0, 43, 39, 40], ["+", 8, 9, 0, 52, 8, 9, 0, 43, 39, 40], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 1
| 447
| 4
|
#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, double> tmp;
while (true) {
std::cin >> a >> b >> c >> d >> e >> f;
if (std::cin.eof() == true)
break;
solv(a, b, c, d, e, f, tmp.first, tmp.second);
ans.push_back(tmp);
}
for (auto &&a : ans) {
printf("%0.4f %0.4f\n", a.first, a.second);
}
}
|
#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, double> tmp;
while (true) {
std::cin >> a >> b >> c >> d >> e >> f;
if (std::cin.eof() == true)
break;
solv(a, b, c, d, e, f, tmp.first, tmp.second);
ans.push_back(tmp);
}
for (auto &&a : ans) {
printf("%0.3f %0.3f\n", a.first, a.second);
}
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 1
| 209
| 2
|
#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
printf("%.3f\n", (c * d - f * a) / (b * d - e * a));
return (0);
}
|
#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)
printf("0.000\n");
else
printf("%.3f\n", (c * d - f * a) / (b * d - e * a));
}
return (0);
}
|
[["+", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 24], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 25], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 45], ["+", 31, 16, 31, 16, 31, 16, 31, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]]
| 1
| 152
| 6
|
#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(ansX);
ansX /= 1000;
ansY = (a * f - c * d) / (a * e - b * d);
ansY *= 1000;
if (ansY > 0)
ansY += 0.5;
else
ansY -= 0.5;
ansY = int(ansY);
ansY /= 1000;
std::cout << fixed << setprecision(3) << ansX << " " << fixed
<< setprecision(3) << ansY << std::endl;
}
return 0;
}
|
#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(ansX);
ansX /= 1000;
ansY = (a * f - c * d) / (a * e - b * d);
ansY *= 1000;
if (ansY > 0)
ansY += 0.5;
else
ansY -= 0.5;
ansY = int(ansY);
ansY /= 1000;
std::cout << fixed << setprecision(3) << ansX << " " << fixed
<< setprecision(3) << ansY << std::endl;
}
return 0;
}
|
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
| 1
| 190
| 2
|
#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);
x = (int)x;
y *= 1000;
y = y + (y > 0 ? 0.5 : -0.5);
y = (int)y;
// cout << %.3f %.3f\n << x / 1000 << y / 1000 << endl;
cout << fixed << setprecision(4) << x / 1000 << "," << y / 1000 << endl;
}
return 0;
}
|
#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);
x = (int)x;
y *= 1000;
y = y + (y > 0 ? 0.5 : -0.5);
y = (int)y;
// cout << %.3f %.3f\n << x / 1000 << y / 1000 << endl;
cout << fixed << setprecision(3) << x / 1000 << " " << y / 1000 << endl;
}
return 0;
}
|
[["-", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
| 1
| 170
| 4
|
#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;
cout << setiosflags(ios::fixed) << setprecision(3) << x << " " << y;
}
}
|
#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;
cout << setiosflags(ios::fixed) << setprecision(3) << x << " " << y << endl;
}
}
|
[["+", 0, 52, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22]]
| 1
| 141
| 2
|
#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 * b2 - c2 * b1) / m, y = (a1 * c2 - a2 * c1) / m;
if (fabs(x) < 1e-9)
x = 0;
if (fabs(y) < 1e-9)
y = 0;
cout << x << ' ' << y << '\n';
}
return 0;
}
|
#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 * b2 - c2 * b1) / m, y = (a1 * c2 - a2 * c1) / m;
if (fabs(x) < 1e-9)
x = 0;
if (fabs(y) < 1e-9)
y = 0;
cout << x << ' ' << y << '\n';
}
return 0;
}
|
[["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13]]
| 1
| 160
| 2
|
#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")
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd;
typedef pair<pii, int> p3i;
typedef vector<int> vi;
typedef vector<pii> vii;
typedef vector<pll> vll;
typedef vector<p3i> v3i;
typedef vector<vii> vvii;
typedef vector<p3i> vp3i;
typedef long double ld;
typedef vector<ld> vld;
#define pb push_back
#define mp make_pair
#define REP(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define REPD(i, n) for (int(i) = (n)-1; (i) >= 0; (i)--)
#define FOR(i, a, b) for (int(i) = (a); (i) < (b); (i)++)
#define FORD(i, a, b) for (int(i) = (a); (i) >= (b); (i)--)
#define sz(v) (int)(v).size()
#define all(v) (v).begin(), (v).end()
#define rv(v) reverse(all(v))
#define CL(v, val) memset((v), (val), sizeof((v)))
#define SORT(a) sort(all(a))
#define un(v) SORT(v), (v).resize(unique(all(v)) - (v).begin())
#define eps 1.0e-7
#define X first
#define Y second
#define bit(n) (1 << (n))
#define bit64(n) (ll(1) << (n))
#define sqr(n) ((n) * (n))
ll DET(ll a, ll b, ll c, ll d) { return a * d - b * c; }
int main(void) {
ll a, b, c, d, e, f;
while (scanf("%lld%lld%lld%lld%lld%lld", &a, &b, &c, &d, &e, &f) == 6) {
ll det = DET(a, b, d, e);
ll det1 = DET(c, b, f, e);
ll det2 = DET(a, c, d, f);
double x = 1.0 * det1 / det;
double y = 1.0 * det2 / det;
printf("%.4lf %.4lf\n", x + eps, y + eps);
}
return 0;
}
|
#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")
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd;
typedef pair<pii, int> p3i;
typedef vector<int> vi;
typedef vector<pii> vii;
typedef vector<pll> vll;
typedef vector<p3i> v3i;
typedef vector<vii> vvii;
typedef vector<p3i> vp3i;
typedef long double ld;
typedef vector<ld> vld;
#define pb push_back
#define mp make_pair
#define REP(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define REPD(i, n) for (int(i) = (n)-1; (i) >= 0; (i)--)
#define FOR(i, a, b) for (int(i) = (a); (i) < (b); (i)++)
#define FORD(i, a, b) for (int(i) = (a); (i) >= (b); (i)--)
#define sz(v) (int)(v).size()
#define all(v) (v).begin(), (v).end()
#define rv(v) reverse(all(v))
#define CL(v, val) memset((v), (val), sizeof((v)))
#define SORT(a) sort(all(a))
#define un(v) SORT(v), (v).resize(unique(all(v)) - (v).begin())
#define eps 1.0e-7
#define X first
#define Y second
#define bit(n) (1 << (n))
#define bit64(n) (ll(1) << (n))
#define sqr(n) ((n) * (n))
ll DET(ll a, ll b, ll c, ll d) { return a * d - b * c; }
int main(void) {
ll a, b, c, d, e, f;
while (scanf("%lld%lld%lld%lld%lld%lld", &a, &b, &c, &d, &e, &f) == 6) {
ll det = DET(a, b, d, e);
ll det1 = DET(c, b, f, e);
ll det2 = DET(a, c, d, f);
double x = 1.0 * det1 / det;
double y = 1.0 * det2 / det;
printf("%.3lf %.3lf\n", x + eps, y + eps);
}
return 0;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 1
| 394
| 2
|
#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;
}
|
[["-", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13]]
| 1
| 103
| 2
|
#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 << setprecision(3) << x << " " << y << endl;
}
}
|
#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 << setprecision(3) << x << " " << y << endl;
}
}
|
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22]]
| 1
| 132
| 2
|
#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>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define whole(f, x, ...) \
([&](decltype((x)) whole) { \
return (f)(begin(whole), end(whole), ##__VA_ARGS__); \
})(x)
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i, c) \
for (typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i)
#define EXIST(s, e) ((s).find(e) != (s).end())
#define SORT(c) sort((c).begin(), (c).end())
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define REP_FROM(i, m, n) for (int i = (m); (i) < int(n); ++(i))
#define REP_REV(i, n) for (int i = (n)-1; (i) >= 0; --(i))
#define REP_FROMREV(i, m, n) for (int i = (n)-1; (i) >= int(m); --(i))
#define CLR(a) memset((a), 0, sizeof(a))
#define dump(x) cerr << #x << " = " << (x) << endl;
#define debug(x) \
cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" \
<< " " << __FILE__ << endl;
#ifndef LOCAL
#define cerr \
if (false) \
cerr
#endif
using namespace std;
inline int toInt(string s) {
int v;
istringstream sin(s);
sin >> v;
return v;
}
template <class T> inline string toString(T x) {
ostringstream sout;
sout << x;
return sout.str();
}
template <class T> inline T sqr(T x) { return x * x; }
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
template <class T> inline void setmax(T &a, T const &b) { a = max(a, b); }
template <class T> inline void setmin(T &a, T const &b) { a = min(a, b); }
template <class T> T sq(T x) { return x * x; }
template <class T> T clamp(T a, T l, T r) {
return min(max(a, l), r);
} // [l, r]
const double EPS = 1e-10;
const double PI = acos(-1.0);
void solve(int a, int b, int c, int d, int e, int f) {
double x, y;
y = (d * c - a * f) / (d * b - a * e);
x = (c - b * y) / a;
printf("%.3f %.3f\n", x, y);
}
int main(int argc, char *argv[]) {
// Something to do
int a, b, c, d, e, f;
while (cin >> a >> b >> c >> d >> e >> f) {
solve(a, b, c, d, e, f);
}
return 0;
}
|
#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>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define whole(f, x, ...) \
([&](decltype((x)) whole) { \
return (f)(begin(whole), end(whole), ##__VA_ARGS__); \
})(x)
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i, c) \
for (typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i)
#define EXIST(s, e) ((s).find(e) != (s).end())
#define SORT(c) sort((c).begin(), (c).end())
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define REP_FROM(i, m, n) for (int i = (m); (i) < int(n); ++(i))
#define REP_REV(i, n) for (int i = (n)-1; (i) >= 0; --(i))
#define REP_FROMREV(i, m, n) for (int i = (n)-1; (i) >= int(m); --(i))
#define CLR(a) memset((a), 0, sizeof(a))
#define dump(x) cerr << #x << " = " << (x) << endl;
#define debug(x) \
cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" \
<< " " << __FILE__ << endl;
#ifndef LOCAL
#define cerr \
if (false) \
cerr
#endif
using namespace std;
inline int toInt(string s) {
int v;
istringstream sin(s);
sin >> v;
return v;
}
template <class T> inline string toString(T x) {
ostringstream sout;
sout << x;
return sout.str();
}
template <class T> inline T sqr(T x) { return x * x; }
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
template <class T> inline void setmax(T &a, T const &b) { a = max(a, b); }
template <class T> inline void setmin(T &a, T const &b) { a = min(a, b); }
template <class T> T sq(T x) { return x * x; }
template <class T> T clamp(T a, T l, T r) {
return min(max(a, l), r);
} // [l, r]
const double EPS = 1e-10;
const double PI = acos(-1.0);
void solve(int a, int b, int c, int d, int e, int f) {
double x, y;
y = (d * c - a * f) / (double)(d * b - a * e);
x = (c - b * y) / (double)a;
printf("%.3f %.3f\n", x, y);
}
int main(int argc, char *argv[]) {
// Something to do
int a, b, c, d, e, f;
while (cin >> a >> b >> c >> d >> e >> f) {
solve(a, b, c, d, e, f);
}
return 0;
}
|
[["+", 0, 11, 12, 16, 12, 74, 39, 77, 39, 40], ["+", 0, 1, 0, 11, 12, 16, 12, 74, 0, 25], ["+", 0, 11, 12, 16, 12, 74, 51, 23, 0, 24], ["+", 0, 1, 0, 11, 12, 16, 12, 74, 0, 24]]
| 1
| 547
| 6
|
#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, y);
}
return 0;
}
|
#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", x, y);
}
return 0;
}
|
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
| 1
| 129
| 2
|
#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)) / ((a * e) - (d * b));
if (x == 0) {
x = 0;
}
if (y == 0) {
y = 0;
}
cout << fixed << setprecision(3) << x << endl;
cout << fixed << setprecision(3) << y << endl;
}
return 0;
}
|
#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)) / ((a * e) - (d * b));
if (x == 0) {
x = 0;
}
if (y == 0) {
y = 0;
}
cout << fixed << setprecision(3) << x << " ";
cout << fixed << setprecision(3) << y << endl;
}
return 0;
}
|
[["-", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 62], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6]]
| 1
| 180
| 4
|
#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;
}
|
[["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
| 1
| 98
| 1
|
#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(3) << setiosflags(ios::fixed) << y << endl;
}
return 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) {
y = (double)(a * f - d * c) / (a * e - b * d);
x = (c - b * y) / a;
cout << setprecision(3) << setiosflags(ios::fixed) << x << ' '
<< setprecision(3) << setiosflags(ios::fixed) << y << endl;
}
return 0;
}
|
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 1, 0, 11, 12, 16, 31, 74, 0, 24], ["+", 0, 11, 12, 16, 31, 74, 39, 77, 39, 40], ["+", 0, 1, 0, 11, 12, 16, 31, 74, 0, 25]]
| 1
| 123
| 5
|
#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);
}
} else {
ans = 1;
}
return ans;
}
int main() {
double a, b, c, d, e, f;
double x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
x = (c * e - b * f) / (a * e - b * d);
y = (c * d - a * f) / (b * d - a * e);
if (x * 1000 < 1) {
x = 0;
}
if (y * 1000 < 1) {
y = 0;
}
cout << fixed << setprecision(3) << x << " " << fixed << setprecision(3)
<< y << endl;
}
return 0;
}
|
#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);
}
} else {
ans = 1;
}
return ans;
}
int main() {
double a, b, c, d, e, f;
double x, y;
while (cin >> a >> b >> c >> d >> e >> f) {
x = (c * e - b * f) / (a * e - b * d);
y = (c * d - a * f) / (b * d - a * e);
if (fabs(x) * 1000 < 1) {
x = 0;
}
if (fabs(y) * 1000 < 1) {
y = 0;
}
cout << fixed << setprecision(3) << x << " " << fixed << setprecision(3)
<< y << endl;
}
return 0;
}
|
[["+", 15, 339, 51, 16, 31, 16, 31, 2, 63, 22], ["+", 51, 16, 31, 16, 31, 2, 3, 4, 0, 24], ["+", 51, 16, 31, 16, 31, 2, 3, 4, 0, 25], ["+", 0, 52, 8, 9, 0, 57, 15, 339, 0, 24]]
| 1
| 227
| 6
|
#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;
printf("%.3f %.3f", x, y);
}
return 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;
printf("%.3f %.3f\n", x, y);
}
return 0;
}
|
[["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
| 1
| 129
| 1
|
#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 d8y[8] = {0, 1, 1, 1, 0, -1, -1, -1};
typedef long long ll;
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);
x = (c - b * y) / a;
}
printf("%.3f %.3f\n", x, y);
return 0;
}
|
#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 d8y[8] = {0, 1, 1, 1, 0, -1, -1, -1};
typedef long long ll;
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);
x = (c - b * y) / a;
printf("%.3f %.3f\n", x, y);
}
return 0;
}
|
[["-", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]]
| 1
| 212
| 2
|
#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.000 : x;
y = (y == -0.0) ? 0.000 : y;
cout << fixed << setprecision(3);
cout << x << " " << y << endl;
}
return 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) ? 0.000 : x;
y = (y == -0.0) ? 0.000 : y;
cout << fixed << setprecision(3);
cout << x << " " << y << endl;
}
return 0;
}
|
[["-", 12, 16, 31, 74, 51, 23, 0, 16, 12, 13], ["+", 12, 16, 31, 74, 51, 23, 0, 16, 12, 13]]
| 1
| 160
| 4
|
#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", (c - f) / (b - e) == -0 ? 0 : (c - f) / (b - e));
}
return 0;
}
|
#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\n", (c - f) / (b - e) == -0 ? 0 : (c - f) / (b - e));
}
return 0;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 1
| 161
| 4
|
#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-9;
y += 1e-9;
printf("%.4lf %.4lf\n", x, y);
}
}
|
#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-9;
y += 1e-9;
printf("%.3lf %.3lf\n", x, y);
}
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 1
| 113
| 2
|
#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
<< endl;
}
return 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) {
y = (c * d - a * f) / (b * d - a * e);
x = (c - (b * y)) / a;
cout << setiosflags(ios::fixed) << setprecision(3) << x << " " << y << endl;
}
return 0;
}
|
[["-", 31, 16, 12, 2, 3, 4, 0, 343, 141, 22], ["+", 31, 16, 12, 2, 3, 4, 0, 343, 141, 22], ["-", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13]]
| 1
| 113
| 4
|
#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 (!x)
x = 0;
if (!y)
y = 0;
cout << x << ' ' << y << '\n';
}
return 0;
}
|
#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 (!x)
x = 0;
if (!y)
y = 0;
cout << x << ' ' << y << '\n';
}
return 0;
}
|
[["-", 0, 1, 0, 16, 12, 2, 3, 4, 0, 13], ["+", 0, 1, 0, 16, 12, 2, 3, 4, 0, 13]]
| 1
| 149
| 2
|
#include <bits/stdc++.h>
using namespace std;
#define all(vec) vec.begin(), vec.end()
typedef long long int ll;
typedef pair<int, int> P;
const ll MOD = 1000000007;
const ll INF = 1000000010;
const ll LINF = 4000000000000000010LL;
const int MAX = 310;
const double EPS = 1e-8;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
int main() {
double a, b, c, d, e, f;
while (cin >> a >> b >> c >> d >> e >> f) {
double y = (a * f - c * d) / (a * e - b * d);
double x = (-b * y + c) / a;
x *= 1000;
printf("%.3f\n", round(x) / 1000);
y *= 1000;
printf("%.3f ", round(y) / 1000);
}
}
|
#include <bits/stdc++.h>
using namespace std;
#define all(vec) vec.begin(), vec.end()
typedef long long int ll;
typedef pair<int, int> P;
const ll MOD = 1000000007;
const ll INF = 1000000010;
const ll LINF = 4000000000000000010LL;
const int MAX = 310;
const double EPS = 1e-8;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
int main() {
double a, b, c, d, e, f;
while (cin >> a >> b >> c >> d >> e >> f) {
double y = (a * f - c * d) / (a * e - b * d);
double x = (-b * y + c) / a;
x *= 1000;
printf("%.3f ", round(x) / 1000);
y *= 1000;
printf("%.3f\n", round(y) / 1000);
}
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
| 1
| 200
| 6
|
#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;
cout << fixed << setprecision(3) << x << " " << y << endl;
}
return 0;
}
|
#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;
cout << fixed << setprecision(3) << x << " " << y << endl;
}
return 0;
}
|
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
| 1
| 137
| 2
|
#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;
}
|
[["+", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 24], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 25], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 45], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]]
| 1
| 101
| 6
|
#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.0005 && ans2 > -0.0005)
ans2 = 0;
printf("%1.3f %1.3f\n", ans1, ans2);
return 0;
}
|
#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 = 0;
if (ans2 < 0.0005 && ans2 > -0.0005)
ans2 = 0;
printf("%1.3f %1.3f\n", ans1, ans2);
}
return 0;
}
|
[["+", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 24], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 25], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 45], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]]
| 1
| 131
| 6
|
#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;
}
if (ansy == 0) {
ansy = 0;
}
printf("%.4lf %.4lf\n", ansx, ansy);
}
}
|
#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;
}
if (ansy == 0) {
ansy = 0;
}
printf("%.3lf %.3lf\n", ansx, ansy);
}
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 1
| 137
| 2
|
#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 tmp2 =
static_cast<float>(e) -
(static_cast<float>(b) * static_cast<float>(d) / static_cast<float>(a));
float y = tmp1 / tmp2;
float x = (static_cast<float>(c) - static_cast<float>(b) * y) /
static_cast<float>(a);
printf("%f %f\n", x, y);
// printf("y=%f\n", (f-(c*d/a))/(e-(b*d/a)));
}
return 0;
}
|
#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 tmp2 =
static_cast<float>(e) -
(static_cast<float>(b) * static_cast<float>(d) / static_cast<float>(a));
float y = tmp1 / tmp2;
float x = (static_cast<float>(c) - static_cast<float>(b) * y) /
static_cast<float>(a);
printf("%.3f %.3f\n", x, y);
// printf("y=%f\n", (f-(c*d/a))/(e-(b*d/a)));
}
return 0;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 1
| 195
| 2
|
#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 << setiosflags(ios::fixed) << setprecision(4) << x << " " << y << endl;
}
return 0;
}
|
#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 << setiosflags(ios::fixed) << setprecision(3) << x << " " << y << endl;
}
return 0;
}
|
[["-", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 13]]
| 1
| 133
| 2
|
#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))) / 1000;
else
x = ((double)((int)(x * 1000 - 0.5))) / 1000;
if (y >= 0)
y = ((double)((int)(y * 1000 + 0.5))) / 1000;
else
y = ((double)((int)(y * 1000 + 0.5))) / 1000;
printf("%.03f %.03f\n", x, y);
}
}
|
#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))) / 1000;
else
x = ((double)((int)(x * 1000 - 0.5))) / 1000;
if (y >= 0)
y = ((double)((int)(y * 1000 + 0.5))) / 1000;
else
y = ((double)((int)(y * 1000 - 0.5))) / 1000;
printf("%.03f %.03f\n", x, y);
}
}
|
[["-", 51, 23, 0, 74, 51, 23, 0, 16, 17, 72], ["+", 51, 23, 0, 74, 51, 23, 0, 16, 17, 33]]
| 1
| 237
| 2
|
#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, y + 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, y + 1e-8);
}
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 1
| 117
| 2
|
#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);
y = round(y, 4);
printf("%.3f %.3f\n", x, y);
}
return 0;
}
double round(double src, int n) {
double p = src * pow(10, n - 1);
p = floor(p + 0.5);
p = p * pow(10, -(n - 1));
return p;
}
|
#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);
y = round(y, 4);
printf("%.3f %.3f\n", x, y);
}
return 0;
}
double round(double src, int n) {
double p = src * pow(10, n - 1);
p = floor(p + 0.5);
p = p * pow(10, -(n - 1));
return p;
}
|
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]]
| 1
| 189
| 2
|
#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;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 1
| 108
| 2
|
#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);
}
}
|
[["+", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 24], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 25], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 45], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]]
| 1
| 102
| 6
|
#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 << setiosflags(ios::fixed);
cout << (x == -0.0 ? 0.0 : x) << " " << (y == -0.0 ? 0.0 : y) << endl;
}
|
#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 << setprecision(3);
cout << setiosflags(ios::fixed);
cout << (x == -0.0 ? 0.0 : x) << " " << (y == -0.0 ? 0.0 : y) << endl;
}
}
|
[["+", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 24], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 25], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 45], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]]
| 1
| 146
| 6
|
#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;
}
if (y == -0.0) {
y = 0;
}
printf("%f %f\n", x, y);
}
return 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;
}
if (y == -0.0) {
y = 0;
}
printf("%.3f %.3f\n", x, y);
}
return 0;
}
|
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
| 1
| 144
| 2
|
#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;
double a, b, c, d, e, f, x, y;
double rmat[2][2];
int main() {
while (cin >> a >> b >> c >> d >> e >> f, !cin.eof()) {
double delta = 1 / (a * e - b * d);
rmat[0][0] = delta * e;
rmat[0][1] = -delta * b;
rmat[1][0] = -delta * d;
rmat[1][1] = delta * a;
x = c * rmat[0][0] + f * rmat[0][1];
y = c * rmat[1][0] + f * rmat[1][1];
printf("%.3lf %.3lf", x, y);
}
return 0;
}
|
#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;
double a, b, c, d, e, f, x, y;
double rmat[2][2];
int main() {
while (cin >> a >> b >> c >> d >> e >> f, !cin.eof()) {
double delta = 1 / (a * e - b * d);
rmat[0][0] = delta * e;
rmat[0][1] = -delta * b;
rmat[1][0] = -delta * d;
rmat[1][1] = delta * a;
x = c * rmat[0][0] + f * rmat[0][1];
y = c * rmat[1][0] + f * rmat[1][1];
printf("%.3lf %.3lf\n", x, y);
}
return 0;
}
|
[["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
| 1
| 223
| 1
|
#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)));
}
return 0;
}
|
#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 * d)));
}
return 0;
}
|
[["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 85], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 22]]
| 1
| 117
| 2
|
#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)),
r((-c * d + a * 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)),
r((-c * d + a * f) / (a * e - b * d)));
}
|
[["+", 8, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
| 1
| 137
| 1
|
until gets.nil?
data = gets
data = data.split(nil)
sum = data[0].to_i + data[1].to_i
puts sum.to_s.length
end
|
while data = gets
data = data.split(nil)
sum = data[0].to_i + data[1].to_i
puts sum.to_s.length
end
|
[["-", 36, 36, 36, 36, 0, 493, 0, 750, 0, 750], ["-", 36, 36, 0, 493, 0, 750, 15, 652, 486, 22], ["-", 36, 36, 0, 493, 0, 750, 15, 652, 17, 131], ["-", 36, 36, 0, 493, 0, 750, 15, 652, 735, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 89, 0, 89]]
| 4
| 37
| 5
|
while input = gets
break if gets == ''
input.chomp.split(' ').map(&:to_i).inject(&:+).to_s.length
end
|
while input = gets
break if input == ''
puts input.chomp.split(' ').map(&:to_i).inject(&:+).to_s.length
end
|
[["-", 0, 89, 8, 170, 0, 751, 15, 738, 31, 22], ["+", 0, 89, 8, 170, 0, 751, 15, 738, 31, 22], ["+", 0, 493, 0, 89, 8, 170, 0, 652, 735, 22]]
| 4
| 37
| 3
|
a, b = gets.chomp.split
a = a.to_i
b = b.to_i
c = a + b
i = 0
while c.positive?
c /= 10
i += 1
end
puts i
|
while n = gets
a, b = n.chomp.split
a = a.to_i
b = b.to_i
c = a + b
i = 0
while c.positive?
c /= 10
i += 1
end
puts i
end
|
[["+", 36, 36, 36, 36, 0, 493, 0, 89, 0, 89], ["+", 36, 36, 0, 493, 0, 89, 15, 662, 31, 22], ["+", 36, 36, 0, 493, 0, 89, 15, 662, 0, 32], ["+", 36, 36, 0, 493, 0, 89, 15, 662, 12, 22], ["-", 0, 493, 0, 662, 12, 652, 486, 652, 486, 22], ["+", 8, 170, 0, 662, 12, 652, 486, 652, 486, 22], ["+", 36, 36, 0, 493, 0, 89, 8, 170, 0, 444]]
| 4
| 40
| 7
|
#!/usr/bin/env ruby
while line = gets
a, b = line.split.map(&:to_i)
c = a + b
i = 1
while c > 10
c /= 10
i += 1
end
puts i
end
|
while line = gets
a, b = line.split.map(&:to_i)
c = a + b
i = 1
while c >= 10
c /= 10
i += 1
end
puts i
end
|
[["-", 0, 89, 8, 170, 0, 89, 15, 738, 17, 47], ["+", 0, 89, 8, 170, 0, 89, 15, 738, 17, 20]]
| 4
| 40
| 2
|
while vals = gets
puts vals.map(&:to_i).inject(:+).to_s.split('').size
end
|
while vals = gets
puts vals.split.map(&:to_i).inject(:+).to_s.split('').size
end
|
[["+", 486, 652, 486, 652, 486, 652, 486, 652, 735, 22], ["+", 486, 652, 486, 652, 486, 652, 486, 652, 17, 131]]
| 4
| 28
| 2
|
gets.each_line do |line|
num = line.split(' ')
sum = 0
num.each { |n| sum += n.to_i }
cnt = 0
while sum.positive?
sum /= 10
cnt += 1
end
p cnt
end
|
$stdin.each_line do |line|
num = line.split(' ')
sum = 0
num.each { |n| sum += n.to_i }
cnt = 0
while sum.positive?
sum /= 10
cnt += 1
end
p cnt
end
|
[["-", 36, 36, 36, 36, 0, 493, 0, 652, 486, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 652, 486, 744]]
| 4
| 50
| 2
|
loop do
date = gets
break unless date
date.split
puts (date[0].to_i + date[1].to_i).to_s.size
end
|
loop do
date = gets
break unless date
date = date.split
puts (date[0].to_i + date[1].to_i).to_s.size
end
|
[["+", 0, 652, 196, 737, 8, 736, 0, 662, 0, 32], ["+", 196, 737, 8, 736, 0, 662, 12, 652, 486, 22]]
| 4
| 32
| 2
|
lines = gets(nil)
lines.each do |line|
a, b = line.split.map(&:to_i)
puts (a + b).to_s.size
end
|
lines = readlines
lines.each do |line|
a, b = line.split.map(&:to_i)
puts (a + b).to_s.size
end
|
[["-", 36, 36, 0, 493, 0, 662, 12, 652, 735, 22], ["-", 0, 493, 0, 662, 12, 652, 3, 4, 0, 24], ["-", 0, 662, 12, 652, 3, 4, 0, 477, 0, 477], ["-", 0, 493, 0, 662, 12, 652, 3, 4, 0, 25], ["+", 36, 36, 36, 36, 0, 493, 0, 662, 12, 22]]
| 4
| 37
| 5
|
while line = gets
a, b = line.split.map(&:to_i)
puts (a + b).to_s
end
|
while line = gets
a, b = line.split.map(&:to_i)
puts (a + b).to_s.length.to_s
end
|
[["+", 0, 652, 3, 4, 0, 652, 486, 652, 17, 131], ["+", 0, 652, 3, 4, 0, 652, 486, 652, 735, 22], ["+", 8, 170, 0, 652, 3, 4, 0, 652, 17, 131], ["+", 8, 170, 0, 652, 3, 4, 0, 652, 735, 22]]
| 4
| 26
| 4
|
while line = gets
num = line.split("\s")
sum = num[0].to_i + num[1].to_i
len = sum.to_s.rength
puts len.to_s
end
|
while line = gets
num = line.split("\s")
sum = num[0].to_i + num[1].to_i
len = sum.to_s.length
puts len.to_s
end
|
[["-", 0, 89, 8, 170, 0, 662, 12, 652, 735, 22], ["+", 0, 89, 8, 170, 0, 662, 12, 652, 735, 22]]
| 4
| 41
| 2
|
while s = gets
puts s.split(/\s/).map(&:to_i).inject(:+)
end
|
while s = gets
puts s.split(/\s/).map(&:to_i).inject(:+).to_s.size
end
|
[["+", 0, 652, 3, 4, 0, 652, 486, 652, 17, 131], ["+", 0, 652, 3, 4, 0, 652, 486, 652, 735, 22], ["+", 8, 170, 0, 652, 3, 4, 0, 652, 17, 131], ["+", 8, 170, 0, 652, 3, 4, 0, 652, 735, 22]]
| 4
| 25
| 4
|
class Array
def keta
map(&:to_i).reduce(:+).to_s.length
end
end
while i = $stdin.gets.chomp.split(' ').keta
puts I
end
|
class Array
def keta
map(&:to_i).reduce(:+).to_s.length
end
end
while i = $stdin.gets
puts i.chomp.split(' ').keta
end
|
[["+", 0, 493, 0, 89, 8, 170, 0, 652, 735, 22], ["+", 3, 4, 0, 652, 486, 652, 486, 652, 486, 22], ["-", 0, 493, 0, 89, 8, 170, 0, 652, 735, 22], ["-", 0, 89, 8, 170, 0, 652, 3, 4, 0, 743]]
| 4
| 40
| 4
|
while str = gets
puts Math.log10(str.chomp.split(' ').map(&:to_i).inject(&:+)).to_i
end
|
while str = gets
puts Math.log10(str.chomp.split(' ').map(&:to_i).inject(&:+)).to_i + 1
end
|
[["+", 8, 170, 0, 652, 3, 4, 0, 738, 17, 72], ["+", 8, 170, 0, 652, 3, 4, 0, 738, 12, 612]]
| 4
| 35
| 2
|
puts gets.split("\n").map { |e| e.split(' ').map(&:to_i).sum.to_s.size }
|
puts gets(nil).split("\n").map { |e| e.split(' ').map(&:to_i).sum.to_s.size }
|
[["+", 0, 652, 486, 652, 486, 652, 3, 4, 0, 24], ["+", 486, 652, 486, 652, 3, 4, 0, 477, 0, 477], ["+", 0, 652, 486, 652, 486, 652, 3, 4, 0, 25]]
| 4
| 36
| 3
|
while l = gets do p l.split.map(:to_i).inject(:+).to_s.length end
|
while l = gets do p l.split.map(&:to_i).inject(:+).to_s.length end
|
[["+", 486, 652, 486, 652, 3, 4, 0, 752, 0, 67]]
| 4
| 24
| 1
|
while line = gets
line.split.map!(&:to_i)
puts (line[0] + line[1]).to_s.length
end
|
while line = gets
line = line.chomp.split.map(&:to_i)
puts (line[0] + line[1]).to_s.length
end
|
[["+", 0, 493, 0, 89, 8, 170, 0, 662, 0, 32], ["+", 0, 662, 12, 652, 486, 652, 486, 652, 486, 22], ["+", 0, 662, 12, 652, 486, 652, 486, 652, 17, 131], ["+", 0, 662, 12, 652, 486, 652, 486, 652, 735, 22], ["-", 0, 493, 0, 89, 8, 170, 0, 652, 735, 22], ["+", 0, 89, 8, 170, 0, 662, 12, 652, 735, 22]]
| 4
| 30
| 6
|
loop do
line = gets.strip
break if line.empty?
puts line.map(&:to_i).reduce(&:+).to_s.length
end
|
loop do
line = gets
break if line.nil?
puts line.split.map(&:to_i).reduce(&:+).to_s.length
end
|
[["-", 196, 737, 8, 736, 0, 662, 12, 652, 17, 131], ["-", 196, 737, 8, 736, 0, 662, 12, 652, 735, 22], ["-", 196, 737, 8, 736, 0, 751, 15, 652, 735, 22], ["+", 196, 737, 8, 736, 0, 751, 15, 652, 735, 22], ["+", 486, 652, 486, 652, 486, 652, 486, 652, 17, 131], ["+", 486, 652, 486, 652, 486, 652, 486, 652, 735, 22]]
| 4
| 31
| 6
|
digits = []
loop do
data = gets
break if data.eof? || (data == "\n") || (data == "\n\r")
x, y = data.split.map(&:to_i)
digits.push((x + y).to_s.length)
end
digits.each do |d|
puts d
end
|
digits = []
loop do
data = gets
break if data.nil? || (data == "\n") || (data == "\n\r")
x, y = data.split.map(&:to_i)
digits.push((x + y).to_s.length)
end
digits.each do |d|
puts d
end
|
[["-", 0, 751, 15, 738, 31, 738, 31, 652, 735, 22], ["+", 0, 751, 15, 738, 31, 738, 31, 652, 735, 22]]
| 4
| 69
| 2
|
# -*- coding: utf-8 -*-
import sys
for s in sys.stdin:
print(len(int(s.rstrip().split()[0])+int(s.rstrip().split()[1])))
|
# -*- coding: utf-8 -*-
import sys
for s in sys.stdin:
print(len(str(int(s.rstrip().split()[0])+int(s.rstrip().split()[1]))))
|
[["+", 3, 4, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 3, 4, 0, 657, 12, 652, 3, 4, 0, 25]]
| 5
| 47
| 3
|
#!/usr/bin/python
#-coding:utf8-
import sys
for s in sys.stdin:
data = list(map(int,s.split()))
print(data[0]+data[1])
|
#!/usr/bin/python
#-coding:utf8-
import sys
for s in sys.stdin:
data = list(map(int,s.split()))
print(len(str(data[0]+data[1])))
|
[["+", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 3, 4, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
| 5
| 38
| 6
|
for line in sys.stdin.readlines():
a,b = list(map(int, line.strip().split()))
print(len(str(a+b)))
|
import sys
for line in sys.stdin.readlines():
a,b = list(map(int, line.strip().split()))
print(len(str(a+b)))
|
[["+", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["+", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22]]
| 5
| 44
| 2
|
while True:
try:
value = input().split(" ")
result = int(value[0]) * int(value[1])
print(str(result))
except EOFError:
break
|
while True:
try:
value = input().split(" ")
result = str(int(value[0]) + int(value[1]))
print(len(result))
except EOFError:
break
|
[["+", 8, 196, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["-", 8, 196, 0, 1, 0, 662, 12, 657, 17, 48], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25], ["-", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22]]
| 5
| 45
| 7
|
import sys
def main():
for line in sys.stdin.readlines():
a,b = [int(n) for n in line]
ret = a + b
print(len(str(ret)))
main()
|
import sys
def main():
for line in sys.stdin.readlines():
a,b = [int(n) for n in line.split()]
ret = a + b
print(len(str(ret)))
main()
|
[["+", 12, 658, 0, 659, 12, 652, 63, 319, 0, 131], ["+", 12, 658, 0, 659, 12, 652, 63, 319, 319, 22], ["+", 12, 658, 0, 659, 12, 652, 3, 4, 0, 24], ["+", 12, 658, 0, 659, 12, 652, 3, 4, 0, 25]]
| 5
| 50
| 4
|
import sys.stdin.readlines
for line in sys.stdin.readlines():
a,b = map(int,line.split())
print(len(str(a+b)))
|
import sys
for line in sys.stdin.readlines():
a,b = map(int,line.split())
print(len(str(a+b)))
|
[["-", 36, 36, 0, 656, 0, 596, 141, 673, 0, 131], ["-", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22]]
| 5
| 43
| 4
|
try:
while 1:
print(len(str(sum((input().split())))))
except Exception:
pass
|
try:
while 1:
print(len(str(sum(map(int, input().split())))))
except Exception:
pass
|
[["+", 3, 4, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 21]]
| 5
| 30
| 3
|
while True:
try:
x,y=map(int,input().split())
print(int(math.log10(x+y))+1)
except EOFError:
break
|
import math
while True:
try:
x,y=map(int,input().split())
print(int(math.log10(x+y))+1)
except EOFError:
break
|
[["+", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["+", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22]]
| 5
| 41
| 2
|
try:
s = []
while True:
t = raw_input()
s.append(t)
except EOFError:
for i in range(len(s)):
a = int(s[i].split(' ')[0])
b = int(s[i].split(' ')[1])
print(len(str(a + b)))
|
try:
s = []
while True:
t = input()
s.append(t)
except EOFError:
for i in range(len(s)):
a = int(s[i].split(' ')[0])
b = int(s[i].split(' ')[1])
print(len(str(a + b)))
|
[["-", 8, 196, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 8, 196, 0, 1, 0, 662, 12, 652, 63, 22]]
| 5
| 84
| 2
|
import sys
a=[]
for i in sys.stdin:
a.append(list(map(int,i.split())))
for i in a:
print((str(len(str(i[0]+a[1])))))
|
import sys
a=[]
for i in sys.stdin:
a.append(list(map(int,i.split())))
for i in a:
print((str(len(str(i[0]+i[1])))))
|
[["-", 0, 652, 3, 4, 0, 657, 12, 206, 51, 22], ["+", 0, 652, 3, 4, 0, 657, 12, 206, 51, 22]]
| 5
| 59
| 2
|
import sys,math
inputs = list()
for n in sys.stdin:
inputs.append(list(map(int,n.split())))
for n in inputs:
print(math.floor(math.log10(n[0]*n[1]))+1)
|
import sys,math
inputs = list()
for n in sys.stdin:
inputs.append(list(map(int,n.split())))
for n in inputs:
print(math.floor(math.log10(n[0]+n[1]))+1)
|
[["-", 3, 4, 0, 652, 3, 4, 0, 657, 17, 48], ["+", 3, 4, 0, 652, 3, 4, 0, 657, 17, 72]]
| 5
| 63
| 2
|
for line in sys.stdin:
a, b = map(int, line.split())
print(len(str(a + b)))
|
import sys
for line in sys.stdin:
a, b = map(int, line.split())
print(len(str(a + b)))
|
[["+", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["+", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22]]
| 5
| 33
| 2
|
# -*- coding: utf-8 -*-
import sys
for line in sys.stdin:
a, b = list(map(int, input().split()))
print(len(str(a+b)))
|
# -*- coding: utf-8 -*-
import sys
for line in sys.stdin:
a, b = list(map(int, line.split()))
print(len(str(a+b)))
|
[["-", 3, 4, 0, 652, 63, 319, 500, 652, 63, 22], ["-", 0, 652, 63, 319, 500, 652, 3, 4, 0, 24], ["-", 0, 652, 63, 319, 500, 652, 3, 4, 0, 25], ["+", 0, 652, 3, 4, 0, 652, 63, 319, 500, 22]]
| 5
| 41
| 4
|
# coding: utf-8
import sys
import math
numbers = []
for line in open('numberset.dat'):
numbers.append(line.split())
for i in range(len(numbers)):
sum = int(numbers[i][0]) + int(numbers[i][1])
print(int(math.log10(float(sum))) + 1)
|
# coding: utf-8
import sys
import math
numbers = []
for line in sys.stdin:
numbers.append(line.split())
for i in range(len(numbers)):
sum = int(numbers[i][0]) + int(numbers[i][1])
print(int(math.log10(float(sum))) + 1)
|
[["-", 36, 36, 0, 656, 0, 7, 12, 652, 63, 22], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 24], ["-", 0, 7, 12, 652, 3, 4, 0, 557, 0, 654], ["-", 0, 7, 12, 652, 3, 4, 0, 557, 0, 6], ["-", 0, 7, 12, 652, 3, 4, 0, 557, 0, 655], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 25], ["+", 36, 36, 0, 656, 0, 7, 12, 319, 500, 22], ["+", 36, 36, 0, 656, 0, 7, 12, 319, 0, 131], ["+", 36, 36, 0, 656, 0, 7, 12, 319, 319, 22]]
| 5
| 80
| 9
|
# -*-coding:utf-8-*-
def get_input():
while True:
try:
yield "".join(input())
except EOFError:
break
if __name__=="__main__":
array = list(get_input())
for i in range(len(array)):
temp = array[i].split()
a = int(temp[0])
b = int(temp[1])
ans = a + b
print(ans)
|
# -*-coding:utf-8-*-
def get_input():
while True:
try:
yield "".join(input())
except EOFError:
break
if __name__=="__main__":
array = list(get_input())
for i in range(len(array)):
temp = array[i].split()
a = int(temp[0])
b = int(temp[1])
ans = a + b
print(len(str(ans)))
|
[["+", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 3, 4, 0, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
| 5
| 88
| 6
|
import math
while True:
try:
a, b = map(int, input().split())
print(int(math.log10(a + b, 10)) + 1)
except EOFError:
break
|
import math
while True:
try:
a, b = map(int, input().split())
print(int(math.log10(a + b)) + 1)
except EOFError:
break
|
[["-", 31, 652, 3, 4, 0, 652, 3, 4, 0, 21], ["-", 31, 652, 3, 4, 0, 652, 3, 4, 0, 612]]
| 5
| 45
| 2
|
import math
import sys
for line in sys.stdin:
a, b = map(int, line.split())
print(math.log10(a + b) + 1)
|
import math
import sys
for line in sys.stdin:
a, b = map(int, line.split())
print(int(math.log10(a + b)) + 1)
|
[["+", 0, 652, 3, 4, 0, 657, 31, 652, 63, 22], ["+", 3, 4, 0, 657, 31, 652, 3, 4, 0, 24], ["+", 31, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
| 5
| 38
| 3
|
def get_input():
while True:
try:
yield ''.join(input())
except EOFError:
break
if __name__ == '__main__':
a = list(get_input())
for n in a:
inl=n.split()
num=inl[0]+inl[1]
l=list(str(num))
time=0
for i in l:
time+=1
print(time)
|
def get_input():
while True:
try:
yield ''.join(input())
except EOFError:
break
if __name__ == '__main__':
a = list(get_input())
for n in a:
inl=n.split()
num=int(inl[0])+int(inl[1])
l=list(str(num))
time=0
for i in l:
time+=1
print(time)
|
[["+", 0, 1, 0, 662, 12, 657, 31, 652, 63, 22], ["+", 0, 662, 12, 657, 31, 652, 3, 4, 0, 24], ["+", 0, 662, 12, 657, 31, 652, 3, 4, 0, 25], ["+", 0, 1, 0, 662, 12, 657, 12, 652, 63, 22], ["+", 0, 662, 12, 657, 12, 652, 3, 4, 0, 24], ["+", 0, 662, 12, 657, 12, 652, 3, 4, 0, 25]]
| 5
| 86
| 6
|
a = []
for line in sys.stdin:
a.append(line)
for n in a:
inl=n.split()
num=int(inl[0])+int(inl[1])
l=list(str(num))
time=0
for i in l:
time+=1
print(time)
|
import sys
a = []
for line in sys.stdin:
a.append(line)
for n in a:
inl=n.split()
num=int(inl[0])+int(inl[1])
l=list(str(num))
time=0
for i in l:
time+=1
print(time)
|
[["+", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["+", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22]]
| 5
| 70
| 2
|
import math
import sys
for line in sys.stdin:
words=line.strip().split(" ")
a=int(words[0])
b=int(words[1])
c=a+b
if c!=0:
print(int(1.001+math.log(c,10)))
else:
print(1)
|
import math
import sys
for line in sys.stdin:
words=line.strip().split(" ")
a=int(words[0])
b=int(words[1])
c=a+b
if c!=0:
print(int(1.0000001+math.log(c,10)))
else:
print(1)
|
[["-", 3, 4, 0, 652, 3, 4, 0, 657, 31, 531], ["+", 3, 4, 0, 652, 3, 4, 0, 657, 31, 531]]
| 5
| 75
| 2
|
import sys
L = sys.stdin.readlines()
for line in L: ##line?????????????????????
N = line.split() ##N??????????????¨????????????
sums = int(N[0]) + int(N[1])
print(len(str(sums))+1)
|
import sys
L = sys.stdin.readlines()
for line in L: ##line?????????????????????
N = line.split() ##N??????????????¨????????????
sums = int(N[0]) + int(N[1])
print(len(str(sums)))
|
[["-", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]]
| 5
| 54
| 2
|
import sys
for i in sys.stdin:
print(len(list(str(sum(map(int,input().split()))))))
|
import sys
for i in sys.stdin: print(len(list(str(sum(map(int,i.split()))))))
|
[["-", 3, 4, 0, 652, 63, 319, 500, 652, 63, 22], ["-", 0, 652, 63, 319, 500, 652, 3, 4, 0, 24], ["-", 0, 652, 63, 319, 500, 652, 3, 4, 0, 25], ["+", 0, 652, 3, 4, 0, 652, 63, 319, 500, 22]]
| 5
| 36
| 4
|
import sys
for line in sys.stdin:
a, b = line.split()
print(len(str(a + b)))
|
import sys
for line in sys.stdin:
a, b = line.split()
print(len(str(int(a) + int(b))))
|
[["+", 0, 652, 3, 4, 0, 657, 31, 652, 63, 22], ["+", 3, 4, 0, 657, 31, 652, 3, 4, 0, 24], ["+", 3, 4, 0, 657, 31, 652, 3, 4, 0, 25], ["+", 0, 652, 3, 4, 0, 657, 12, 652, 63, 22], ["+", 3, 4, 0, 657, 12, 652, 3, 4, 0, 24], ["+", 3, 4, 0, 657, 12, 652, 3, 4, 0, 25]]
| 5
| 30
| 6
|
# -*- coding: utf-8 -*-
import sys
def get_digits(n):
if n < 0:
n *= -1
return len(str(n))
def main():
data = []
for line in sys.stdin:
a, b = map(int, input().split())
digits = get_digits(a+b)
print(digits)
if __name__ == '__main__':
main()
|
# -*- coding: utf-8 -*-
import sys
def get_digits(n):
if n < 0:
n *= -1
return len(str(n))
def main():
data = []
for line in sys.stdin:
a, b = map(int, line.split())
digits = get_digits(a+b)
print(digits)
if __name__ == '__main__':
main()
|
[["-", 3, 4, 0, 652, 63, 319, 500, 652, 63, 22], ["-", 0, 652, 63, 319, 500, 652, 3, 4, 0, 24], ["-", 0, 652, 63, 319, 500, 652, 3, 4, 0, 25], ["+", 12, 652, 3, 4, 0, 652, 63, 319, 500, 22]]
| 5
| 80
| 4
|
while True:
try:
line = input()
except EOFError:
break
s = sum(map(int, line.split()))
num = 0
for c in s:
if c.isdigit():
num += 1
print(num)
|
while True:
try:
line = input()
except EOFError:
break
s = sum(map(int, line.split()))
num = 0
for c in str(s):
if c.isdigit():
num += 1
print(num)
|
[["+", 0, 52, 8, 196, 0, 7, 12, 652, 63, 22], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 24], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 25]]
| 5
| 51
| 3
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.