Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- import java.io.*;
- public class Main{
- public static PrintStream saida=System.out;
- public static Scanner sc=new Scanner(System.in);
- public static void main(String[] args) {
- int a=sc.nextInt(),b=sc.nextInt(),c=sc.nextInt();
- if(a>=b+c||b>=a+c||c>=b+a){
- saida.printf("n\n");
- }
- else {
- if(Math.pow(a,2)==Math.pow(b,2)+Math.pow(c,2)||Math.pow(b,2)==Math.pow(a,2)+Math.pow(c,2)||Math.pow(c,2)==Math.pow(b,2)+Math.pow(a,2)){
- saida.printf("r\n");
- }
- else if (Math.pow(a,2)>Math.pow(c,2)+Math.pow(b,2)||Math.pow(b,2)>Math.pow(a,2)+Math.pow(c,2)||Math.pow(c,2)>Math.pow(b,2)+Math.pow(a,2)){
- saida.printf("o\n");
- }
- else if(Math.pow(a,2)<Math.pow(b,2)+Math.pow(c,2)||Math.pow(b,2)<Math.pow(c,2)+Math.pow(a,2)||Math.pow(c,2)<Math.pow(b,2)+Math.pow(a,2)){
- saida.printf("a\n");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement