Solution for CCC '14 J1 - Triangle Times in Java 8


Dec. 8, 2019 1.172910 seconds Java 8
import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) {
      
        Scanner in = new Scanner(System.in);
        int a = in.nextInt();
        int b = in.nextInt();
        int c = in.nextInt();

        if(a + b + c != 180){
            System.out.println("Error");
        }else if(a == b && c == b){
            System.out.println("Equilateral");
        }
        else if(a == b || a == c || c == b){
            System.out.println("Isosceles");
        }else if(a != b && c != b){
            System.out.println("Scalene");
        }
 
    }
  
    
}

Editorial


No editorial for this problem. :(

Original Problem


You can view the original page for this problem on the DMOJ.