Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

1041 uri solution

//uri problem 1041 || coordinates of a point in python 3.9

inp = input()
x, y = inp.split()
x = float(x)
y = float(y)
if x == 0 and y ==0:
    print("Origem")
elif(x==0):
    print("Eixo Y")
elif(y==0):
    print("Eixo X")
elif x > 0 and y > 0:
    print("Q1")
elif x < 0 and y > 0:
    print("Q2")
elif x < 0 and y < 0:
    print("Q3")
elif x > 0 and y < 0:
    print("Q4")
Comment

1042 uri solution

#uri 1042 solution || simple sort
x, y, z = map(int,input().split())
arr = [x,y,z]
arr.sort()
print(f"{arr[0]}
{arr[1]}
{arr[2]}")
print(f"
{x}
{y}
{z}")
Comment

1043 uri solution

# 1043 triangle
a, b, c = map(float,input().split())
if a+b > c and b+c > a and a+c > b:
    peri = a+b+c
    print("Perimetro = {:.1f}".format(peri))
else:
    area = ((a+b)/2) *c
    print("Area = {:.1f}".format(area))
Comment

1044 uri solution

# 1044 Multiples
a, b = map(int,input().split())
if a%b ==0 or b%a == 0:
    print("Sao Multiplos")
else:
    print("Nao sao Multiplos")
Comment

1046 uri solution

a,b=list(map(int,input().split()))
if(a<b):
    time=b-a
else:
    time=b+24-a
print(f"O JOGO DUROU {time} HORA(S)")
Comment

1045 uri solution

data = list(map(float, input().split( )))

data.sort(reverse=True) 

a,b,c = data

if a>=b+c:
    print("NAO FORMA TRIANGULO")
elif a**2 == b**2 + c**2:
    print("TRIANGULO RETANGULO")
elif a**2 > b**2 + c**2:
    print("TRIANGULO OBTUSANGULO")
elif a**2 < b**2 + c**2:
    print("TRIANGULO ACUTANGULO")
    
if a==b and a==c and b==a and b==c and c==a and c==b:
    print("TRIANGULO EQUILATERO")
elif a==b or a==c or b==a or b==c or c==a or c==b:
    print("TRIANGULO ISOSCELES")



Comment

1047 uri solution

a,c,b,d=list(map(int,input().split()))

dif=((b*60)+d)-((a*60)+c)
if(dif<=0):
    dif+=24*60
    
time=dif//60
minute=dif%60
print(f"O JOGO DUROU {time} HORA(S) E {minute} MINUTO(S)")
Comment

1043 uri solution c

#include <stdio.h>
int main()
{
    float A, B, C;
    scanf("%f %f %f", &A, &B, &C);
    if (A < B+C && B < A+C && C < B+C){
        printf("Perimetro = %.1f
",A+B+C);
    }
    else
        printf("Area = %.1f
",((A+B)*C) / 2);
    return 0;
}
Comment

uri 1045 solution in c

#include <stdio.h>

int main(){
    double a,b,c;

    scanf("%lf %lf %lf", &a, &b, &c);

    if(a >= (b+c) || b >= (a+c) || c >= (a+b))
         printf("NAO FORMA TRIANGULO
");
    else if(a*a == (b*b + c*c) || b*b == (a*a + c*c) || c*c == (a*a + b*b))
           printf("TRIANGULO RETANGULO
");
    else if(a*a > (b*b + c*c) || b*b > (a*a + c*c) || c*c > (a*a + b*b))
           printf("TRIANGULO OBTUSANGULO
");
    else if(a*a < (b*b + c*c) || b*b < (a*a + c*c) || c*c < (a*a + b*b))
           printf("TRIANGULO ACUTANGULO
");
    if(a == b && a == c)
            printf("TRIANGULO EQUILATERO
");
    if((a == b && a != c)  || (a == c && a != b) || (b == c && b != a))
            printf("TRIANGULO ISOSCELES
");

 return 0;
    
}
Comment

uri 1042 solution in c

#include <stdio.h>
void printInOrder(int a, int b, int c)
{
    int min, mid, max;
    if(a < b && a < c){
        min = a;
        if(b < c){
            mid = b;
            max = c;
        }else{
            mid = c;
            max = b;
        }
    }else if(b < a && b < c){
        min = b;
        if(a < c){
            mid = a;
            max = c;
        }else{
            mid = c;
            max = a;
        }
    }else{
        min = c;
        if(a < b){
            mid = a;
            max = b;
        }else{
            mid = b;
            max = a;
        }
    }
    printf("%d
%d
%d
", min, mid, max);
}
int main()
{
    int a, b, c;
    scanf("%d %d %d", &a, &b, &c);
    printInOrder(a, b, c);
    printf("
%d
%d
%d
", a, b, c);
    return 0;
}
Comment

PREVIOUS NEXT
Code Example
Python :: send notification from pc to phone using python 
Python :: how to unpack the whole list without index them individually python 
Python :: Fill NaN with the first valid value starting from the rightmost column, then extract first column 
Python :: loc condition on first 3 columns of dataframe 
Python :: python matrices access column 
Python :: how to enumerate the names inside a list python 
Python :: How to assign a value to a dictionary if I need to reference it in the right hand side? 
Python :: python sliding window maximum 
Python :: unpack list 
Python :: how to create a sub project in django 
Python :: fichier python pour brython 
Python :: qubesos 
Python :: python import file from same level 
Python :: shutil cut poython 
Python :: my name is raghuveer 
Python :: apply numba to itertools import product 
Python :: how to select name parent table in model laravel 
Python :: The module in NAME could not be imported: django.contrhtmlib.auth.password_validation.UserAttributeSimilarityValidator. Check your AUTH_PASSWORD_VALIDATORS setting. 
Python :: 7616*75 
Python :: how to get python to write to 100 
Python :: flask return 404 
Python :: Find the minimum item in this RDD 
Python :: data exfiltration icmp 
Python :: tkinter e.delete(0,END) 
Python :: come traferire file python 
Python :: convert python to c++ online 
Python :: python set class variable 
Python :: tess real name from suits 
Python :: python multiple items in with statment 
Python :: create multi new column from apply pandas 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =