Accepted
Code
#include <bits/stdc++.h>
using namespace std;
#define int long long
int32_t main() {
int a, b, c;
cin >> a >> b >> c;
if(a>=b+c || a<=abs(b-c) || b>=a+c || b<=abs(a-c) || c>=b+a || c<=abs(b-a)) {cout << "Not a triangle"; return 0;}
if(a==b || b==c || a==c) {if(a==b && b==c) {cout << "Equilateral"; return 0;} cout << "Isosceles"; return 0;}
cout << "Scalene";
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1108 Triangle Triangle Triangle!!!
- Contest
- Brain Booster #8
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2025-02-17 14:41:11
- Judged At
- 2025-02-17 14:41:11
- Judged By
- Score
- 100
- Total Time
- 1ms
- Peak Memory
- 576.0 KiB