Compile Error
foo.c:1:1: error: unknown type name 'import' 1 | import java.util.*;import java.io.*; | ^~~~~~ foo.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 1 | import java.util.*;import java.io.*; | ^ foo.c:1:20: error: unknown type name 'import' 1 | import java.util.*;import java.io.*; | ^~~~~~ foo.c:1:31: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 1 | import java.util.*;import java.io.*; | ^ foo.c:3:1: error: unknown type name 'public' 3 | public class Main { | ^~~~~~ foo.c:3:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Main' 3 | public class Main { | ^~~~
Code
import java.util.*;import java.io.*;
public class Main {
public static void main(String[] args) {
try {
FastReader in = new FastReader();
FastWriter out = new FastWriter();
int testcases = 1; /* testcases = in.nextInt();*/
while (testcases-- > 0) {
int a = in.nextInt();
int b = in.nextInt();
int c = in.nextInt();
if(a+b >= c && a+c >= b && b+c >= a) {
if(a == b && b == c) {
out.println("Equilateral");
} else if(a != c && b != c && a != b) {
out.println("Scalene");
} else {
out.println("Isosceles");
}
} else {
out.println("Not a triangle");
}
}
out.close();
} catch (Exception e) {
e.printStackTrace();
return;
}
}/* <Fast---reader> */ static class FastReader { BufferedReader br; StringTokenizer st; public FastReader() { br = new BufferedReader(new InputStreamReader(System.in)); } String next() { while (st == null || !st.hasMoreTokens()) { try { st = new StringTokenizer(br.readLine()); } catch (Exception e) { e.printStackTrace(); } } return st.nextToken(); } int nextInt() { return Integer.parseInt(next()); } long nextLong() { return Long.parseLong(next()); } double nextDouble() { return Double.parseDouble(next()); } String nextLine() { String str = ""; try { str = br.readLine().trim(); } catch (Exception e) { e.printStackTrace(); } return str; } }
/* <Fast---writer> */ static class FastWriter { private final BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); public void print(Object object) throws IOException { bw.append("" + object); } public void println() throws IOException { bw.append("\n"); } public void println(Object object) throws IOException { print(object); bw.append("\n"); } public void close() throws IOException { bw.close(); } }
}
Information
- Submit By
- Type
- Submission
- Problem
- P1108 Triangle Triangle Triangle!!!
- Contest
- Brain Booster #8
- Language
- C99 (GCC 13.2.0)
- Submit At
- 2025-02-17 14:34:01
- Judged At
- 2025-02-17 14:34:01
- Judged By
- Score
- 0
- Total Time
- 0ms
- Peak Memory
- 0 Bytes