Go: package main

import (
	"fmt"
	"math"
)

func main() {
	n := scanInt()
	for i := 0; i < n; i++ {
		cal()
	}
}

func scanInt() int {
	var n int
	fmt.Scanf("%d", &n)
	return n
}

func cal() {
	var x1, y1, x2, y2, x3, y3 float64
	fmt.Scanf("%f%f%f%f%f%f", &x1, &y1, &x2, &y2, &x3, &y3)
	a := 2 * (x1 - x2)
	b := 2 * (y1 - y2)
	c := 2 * (x1 - x3)
	d := 2 * (y1 - y3)
	e := x1*x1 - x2*x2 + y1*y1 - y2*y2
	f := x1*x1 - x3*x3 + y1*y1 - y3*y3

	px := (d*e - b*f) / (a*d - b*c)
	py := (a*f - c*e) / (a*d - b*c)

	r := math.Sqrt((x1-px)*(x1-px) + (y1-py)*(y1-py))
	fmt.Printf("%.3f %.3f %.3f\n", px, py, r)
}

C++: #include<cstdio>
#include<math.h>

struct Zahyou
{
	float x, y;
};

int main()
{
	int n;
	Zahyou de[4];

	scanf("%d", &n);
	for (int i = 0; i < n; i++)
	{
		for (int j = 1; j < 4; j++)
		{
			scanf("%f %f", &de[j].x, &de[j].y);
		}
		de[0].x = ((de[1].y - de[3].y)*(pow(de[1].y, 2) - pow(de[2].y, 2) + pow(de[1].x, 2) - pow(de[2].x, 2)) + (de[1].y - de[2].y)*(pow(de[1].y, 2) - pow(de[3].y, 2) + pow(de[1].x, 2) - pow(de[3].x, 2))) / (2 * (de[1].y - de[3].y)*(de[1].x - de[2].x) + 2 * (de[1].y - de[2].y)*(de[1].x - de[3].x));
		de[0].y = ((de[1].x - de[3].x)*(pow(de[1].x, 2) - pow(de[2].x, 2) + pow(de[1].y, 2) - pow(de[2].y, 2)) + (de[1].x - de[2].y)*(pow(de[1].x, 2) - pow(de[3].x, 2) + pow(de[1].y, 2) - pow(de[3].y, 2))) / (2 * (de[1].x - de[3].x)*(de[1].y - de[2].y) + 2 * (de[1].x - de[2].x)*(de[1].y - de[3].y));
		
		printf("%.3f %.3f %.3f\n",de[0].x,de[0].y,sqrt(de[0].x+de[0].y));
	}
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <complex>
#include <cmath>

using namespace std;

typedef complex<double> Point;

bool eqv(double d1, double d2) {
    return abs(d1-d2) < 1e-10;
}

double r_(double x) {
    if(abs(x) < 0.001) return 0;
    return x;
}

int main() {
    int N;

    cin >> N;
    while(N--) {
        double x1, x2, x3, y1, y2, y3;
        cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
        Point p1(x1, y1), p2(x2, y2), p3(x3, y3);

        //³·è
        double R = abs(abs(p3-p2) / sin(arg(p2-p1) - arg(p3-p1))) / 2;

        Point vb = p3-p2;
        double len = sqrt(R*R - norm(vb)/4.0);
        Point vbh = vb * Point(0, 1);
        Point center = p1 + vb/2.0 + vbh*len/abs(vbh);
        if(eqv(abs(center-p1), R) && eqv(abs(center-p2), R) && eqv(abs(center-p3), R)) {}
        else center = p1 + vb/2.0 - vbh*len/abs(vbh);
        printf("%.3f %.3f %.3f\n", center.real(), center.imag(), R);
    }
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long double ld;
class Point{
public:
	ld x,y;
};
ld dist(Point a,Point b){
	return sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y));
}
class Line{
public:
	ld a,b,c;//ax+by=c
	Line(Point s,Point t){
		a=s.x-t.x;
		b=s.y-t.y;
		c=(s.x*s.x + s.y*s.y - t.x*t.x - t.y*t.y)/2.0;
	}
	void multi(ld x){
		a*=x;	b*=x;	c*=x;
	}
};
void solve(Line m,Line n,Point s){
	Point ret;
	ld tmp=m.b;
	m.multi(n.b);	n.multi(tmp);
	ret.x=(m.c-n.c)/(m.a-n.a);
	ret.y=(m.c-n.a*ret.x)/(m.b);
	printf("%.15lf %.15lf %.15lf\n",ret.x,ret.y,dist(ret,s));
}

int main(){
	Point s,t,u;	cin>>s.x>>s.y>>t.x>>t.y>>u.x>>u.y;
	Line m(s,t),n(t,u);
	solve(m,n,s);
	return 0;
}

C++: #include <cstdio>
#include <cmath>

using namespace std;

int main()
{
	int n;
	scanf("%d", &n);
	
	for (int i  = 0; i < n; i++){
		double x[3], y[3], s[3];
		double l, m, n;
		
		for (int j = 0; j < 3; j++){
			scanf("%lf %lf", &x[j], &y[j]);
			s[j] = x[j] * x[j] + y[j] * y[j];
		}
		
		double x2[2], y2[2], s2[2];
		x2[0] = x[0] - x[1];
		y2[0] = y[0] - y[1];
		s2[0] = s[0] - s[1];
		x2[1] = x[0] - x[2];
		y2[1] = y[0] - y[2];
		s2[1] = s[0] - s[2];
		
		m = - (s2[0] * x2[1] - s2[1] * x2[0]) / (y2[0] * x2[1] - y2[1] * x2[0]);
		l = - (s2[0] * y2[1] - s2[1] * y2[0]) / (x2[0] * y2[1] - x2[1] * y2[0]);
		n = - s[0] - x[0] * 1 - y[0] * m;
		
		double a,b,r;
		
		a = l / -2;
		b = m / -2;
		r = sqrt(- n - a * a - b * b - l * a - m * b);
		
		printf("%.3lf %.3lf %.3lf\n", a, b, r);
		
		}
	return(0);
}

C++: #include <bits/stdc++.h>

using namespace std;

#define LOG(...) fprintf(stderr, __VA_ARGS__)
//#define LOG(...)
#define FOR(i, a, b) for(int i=(int)(a); i<(int)(b); ++i)
#define REP(i, n) for(int i=0; i<(int)(n); ++i)
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define EXIST(s, e) ((s).find(e)!=(s).end())
#define SORT(c) sort(ALL(c))
#define RSORT(c) sort(RALL(c))
#define SQ(n) (n) * (n)

typedef long long ll;
typedef unsigned long long ull;
typedef vector<bool> vb;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vb> vvb;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

int main() {
  int n;
  float x1, y1, x2, y2, x3, y3;
  cin >> n;
  REP(i, n){
    cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
    float a = 2 * (x2 - x1);
    float b = 2 * (y2 - y1);
    float e = x2 * x2 + y2 * y2 - x1 * x1 - y1 * y1;
    float c = 2 * (x3 - x2);
    float d = 2 * (y3 - y2);
    float f = x3 * x3 + y3 * y3 - x2 * x2 - y2 * y2;

    float x = (d * e - b * f) / (a * d - b * c);
    float y = (-c * e + a * f) / (a * d - b * c);
    float r = sqrt(SQ(x1 - x) + SQ(x1 - y));
    printf("%.3f %.3f %.3f\n", x, y, r);
  }
}

C++: #include <set>
#include <map>
#include <list>
#include <queue>
#include <stack>
#include <cmath>
#include <ctype.h>
#include <ctime>
#include <cstdio>
#include <vector>
#include <string>
#include <bitset>
#include <cctype>
#include <cstdlib>
#include <cstring>
#include <utility>
#include <numeric>
#include <complex>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <cassert>
#include <iostream>
#include <iterator>
#include <algorithm>

using namespace std;

#define REP(i, x, n) for(int i = x; i < n; i++)
#define rep(i, n) REP(i, 0, n)
#define lengthof(x) (sizeof(x) / sizeof(*(x)))
#define FILL(ptr, value) FILL_((ptr), sizeof(ptr)/sizeof(value), (value))
template <typename T>
void FILL_(void * ptr, size_t size, T value){
  std::fill((T*)ptr, (T*)ptr+size, value);
}
//4方向ベクトル→↑←↓
int dx[] ={1,0,-1,0};
int dy[] ={0,-1,0,1};

int main()
{
  int N;
  cin >>N;
  double x1,y1,x2,y2,x3,y3;
  for(int i = 0;i < N;i++){
    cin >>x1>>y1>>x2>>y2>>x3>>y3;
    double a =(x1-x2);
    double b =(y1-y2);
    double c = -(pow(x1,2)+pow(y1,2))+(pow(x2,2)+pow(y2,2));
    double d =(x2-x3);
    double e =(y2-y3);
    double f =-(pow(x2,2)+pow(y2,2))+(pow(x3,2)+pow(y3,2));
    double l =(c*e-f*b)/(a*e-d*b);
    double m =(c*d-a*f)/(b*d-a*e);
    double n = -(pow(x1,2)+pow(y1,2))-(l*x1+m*y1);
    double x = -l/2;
   
    double y =-m/2;
   
    double r =(sqrt(pow(l,2)+pow(m,2)-4*n))/2.0;
    printf("%.3f %.3f %.3f\n",x,y,r);
  }
  
  return 0;
}

C++: #include <stdio.h>
#include <iostream>

using namespace std;

int main() {

	int n;
	int i,j;

	while (cin >> n) {
		int counter = 1;

		for (i = 3; i <= n; i = i + 2) {
			int kari = 1;
			for (j = 3; j < i; j=j+2) {
				if ((j % 3 == 0 && j != 3) || (j % 5 == 0 && j != 5) || (j % 7 == 0 && j != 7) || (j % 11 == 0 && j != 11) || (j % 13 == 0 && j != 13) || (j % 17 == 0 && j != 17) ||
					(j % 19 == 0 && j != 19) || (j % 23 == 0 && j != 23)) {
					continue;
				} else if (i % j == 0) {
					kari = 0;
					break;
				}
			}

			if (kari != 0) {
				counter++;
			}
		}

		cout << counter << endl;
	}

	return 0;
}