Z. Geometry Test – Codeforces Problem Solution in C++

Disclaimer: Make sure you tried enough before checking the solution

Problem: https://codeforces.com/group/MWSDmqGsZm/contest/223338/problem/Z

#include <bits/stdc++.h>
using namespace std;
int main() {
	long long r,s;
	cin>>r>>s;
	if(s >= r * 2){
		cout<<"Square"<<endl;
	} else if(r*2 > sqrt(pow(s,2) + pow(s,2))){
		cout<<"Circle"<<endl;
	} else {
		cout<<"Complex"<<endl;
	}
}

Assiut University Training – Newcomers Solution Math – Geometry

Leave a Comment