Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
347 B
1
Indexable
#include <iostream>
#include <string>
#include <fstream>
#include <iomanip>
using namespace std;

int main()
{

	float a, b, s, L;
	ifstream in("input.txt");
	ofstream out("output.txt");
	in >> s;
	for (int i = 0; i < s; i++)
	{
		in >> a >> b;
		L = 4 * (3.1415 * a * b + (a - b) * (a - b)) / (a + b);
		cout << L << endl;
	}
}