Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Python/1005.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# -*- coding: utf-8 -*-

a = float(input())
b = float(input())

media = ((a*3.5)+(b*7.5))/11

print("MEDIA = %.5f" %media)
9 changes: 9 additions & 0 deletions Python/1006.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# -*- coding: utf-8 -*-

a = float(input())
b = float(input())
c = float(input())

media = a*0.2+b*0.3+c*0.5

print("MEDIA = %.1f" %media)
9 changes: 9 additions & 0 deletions Python/1009.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# -*- coding: utf-8 -*-

a = str(input())
b = float(input())
c = float(input())

media = b+c*0.15

print("TOTAL = R$ %.2f" %media)
17 changes: 17 additions & 0 deletions Python/1015.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# -*- coding: utf-8 -*-

from math import sqrt
a = str(input())
b = str(input())

a = a.split()
ax = float(a[0])
ay = float(a[1])

b = b.split()
bx = float(b[0])
by = float(b[1])

valor = sqrt((ax-bx)**2 + (ay-by)**2)

print(round(valor,4))
33 changes: 33 additions & 0 deletions Python/1018.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# -*- coding: utf-8 -*-

valor = int(input())
valor1 = valor

cem = int(valor/100)
valor = valor - cem*100

cinq = int(valor/50)
valor = valor - cinq*50

vinte = int(valor/20)
valor = valor - vinte*20

dez = int(valor/10)
valor = valor - dez*10

cinco = int (valor/5)
valor = valor - cinco*5

dois = int(valor/2)
valor = valor - dois*2

um = int(valor)

print("""%d
%d nota(s) de R$ 100,00
%d nota(s) de R$ 50,00
%d nota(s) de R$ 20,00
%d nota(s) de R$ 10,00
%d nota(s) de R$ 5,00
%d nota(s) de R$ 2,00
%d nota(s) de R$ 1,00""" %(valor1, cem, cinq, vinte, dez, cinco, dois, um))
53 changes: 53 additions & 0 deletions Python/1021.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# -*- coding: utf-8 -*-

valor = float(input())

cem = int(valor/100)
valor = valor - cem*100

cinq = int(valor/50)
valor = valor - cinq*50

vinte = int(valor/20)
valor = valor - vinte*20

dez = int(valor/10)
valor = valor - dez*10

cinco = int (valor/5)
valor = valor - cinco*5

dois = int(valor/2)
valor = valor - dois*2

um = int(valor)
valor = valor-um

cinq2 = int(valor/0.5)
valor = valor - cinq2*0.5

vc = int(valor/0.25)
valor = valor - vc*0.25

dez2 = int(valor / 0.1)
valor = valor - dez2*0.1

cinco2 = int(valor / 0.05)
valor = valor - cinco2*0.05

um2 = int(valor / 0.009)

print("""NOTAS:
%d nota(s) de R$ 100.00
%d nota(s) de R$ 50.00
%d nota(s) de R$ 20.00
%d nota(s) de R$ 10.00
%d nota(s) de R$ 5.00
%d nota(s) de R$ 2.00
MOEDAS:
%d moeda(s) de R$ 1.00
%d moeda(s) de R$ 0.50
%d moeda(s) de R$ 0.25
%d moeda(s) de R$ 0.10
%d moeda(s) de R$ 0.05
%d moeda(s) de R$ 0.01""" %(cem, cinq, vinte, dez, cinco, dois, um, cinq2, vc, dez2, cinco2, um2))
15 changes: 15 additions & 0 deletions Python/1035.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# -*- coding: utf-8 -*-

ent = input()

ent = ent.split()

a = int(ent[0])
b = int(ent[1])
c = int(ent[2])
d = int(ent[3])

if(b>c and d>a and (c+d)>(a+b) and c>0 and d>0 and a%2==0):
print("Valores aceitos")
else:
print("Valores nao aceitos")
27 changes: 27 additions & 0 deletions Python/1045.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# -*- coding: utf-8 -*-

entrada = input().split()
lados = []

for i in entrada:
lados.append(int(float(i)*10))

lados.sort(reverse=True)
a = pow(lados[0], 2)
b = pow(lados[1], 2)+pow(lados[2],2)


if(lados[0] >= lados[1]+lados[2]):
print("NAO FORMA TRIANGULO")
else:
if(a==b):
print("TRIANGULO RETANGULO")
elif(a>b):
print("TRIANGULO OBTUSANGULO")
elif(a<b):
print("TRIANGULO ACUTANGULO")

if(lados[0] == lados[1] == lados[2]):
print("TRIANGULO EQUILATERO")
elif((lados[0] == lados[1]) or (lados[0] == lados[2]) or (lados[2] == lados[1])):
print("TRIANGULO ISOSCELES")
21 changes: 21 additions & 0 deletions Python/1047.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-

var = input().split()

for i in range(0,4):
var[i] = int(var[i])

if(var[3] >= var[1]):
horas = var[2]-var[0]
minutos = var[3]-var[1]
else:
horas=var[2]-var[0]-1
minutos = 60-(var[1]-var[3])

if(horas==0 and minutos==0):
horas = 24

if(horas < 0):
horas = horas + 24

print("O JOGO DUROU %d HORA(S) E %d MINUTO(S)" %(horas, minutos))
6 changes: 6 additions & 0 deletions Python/1142.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# -*- coding: utf-8 -*-

valor = int(input())

for i in range(0,valor):
print("%d %d %d PUM" %((i*4+1),(i*4+2),(i*4+3)))
7 changes: 5 additions & 2 deletions Python/1214.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# -*- coding: utf-8 -*-

quant = int(input())
notas = []

for _ in range(quant):
notas.append(list(map(int, input().split())))
notas.append(tuple(map(int, input().split())))
notas = tuple(notas)

for turma in notas:
media = sum(turma[1:])/turma[0]
notas_maiores = [nota for nota in turma[1:] if nota>media]
notas_maiores = tuple(nota for nota in turma[1:] if nota>media)
#Python 3.8
print(f'{(len(notas_maiores)/turma[0])*100:.3f}%')
105 changes: 105 additions & 0 deletions Python/2632.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# -*- coding: utf-8 -*-

from math import sqrt

testes = int(input())
retorno = ""

for i in range(0, testes):
ret = input().split()
circ = input().split()
altura = int(ret[1])
largura = int(ret[0])
nivel = int(circ[1])
centro = [int(circ[2]), int(circ[3])]
atingiu = False
distancia = 0

a = [int(ret[2]), int(ret[3])]
b = [int(ret[2]), int(ret[3])+altura]
c = [int(ret[2])+largura, int(ret[3])+altura]
d = [int(ret[2])+largura, int(ret[3])]

if(circ[0] == "fire"):
dano = 200
if(nivel == 1):
raio = 20
elif(nivel == 2):
raio = 30
elif(nivel == 3):
raio = 50
elif(circ[0] == "water"):
dano = 300
if(nivel == 1):
raio = 10
elif(nivel == 2):
raio = 25
elif(nivel == 3):
raio = 40
elif(circ[0] == "earth"):
dano = 400
if(nivel == 1):
raio = 25
elif(nivel == 2):
raio = 55
elif(nivel == 3):
raio = 70
elif(circ[0] == "air"):
dano = 100
if(nivel == 1):
raio = 18
elif(nivel == 2):
raio = 38
elif(nivel == 3):
raio = 60

if((centro[0]<=a[0]) and (centro[1]<=a[1])):
distancia = sqrt(pow((centro[0]-a[0]), 2) + pow((centro[1]-a[1]), 2))
if(distancia <= raio):
atingiu = True

if((centro[0]<=b[0]) and (centro[1]>=b[1])):
distancia = sqrt(pow((centro[0]-b[0]), 2) + pow((centro[1]-b[1]), 2))
if(distancia <= raio):
atingiu = True

if((centro[0]>=c[0]) and (centro[1]>=c[1])):
distancia = sqrt(pow((centro[0]-c[0]), 2) + pow((centro[1]-c[1]), 2))
if(distancia <= raio):
atingiu = True

if((centro[0]>=d[0]) and (centro[1]<=d[1])):
distancia = sqrt(pow((centro[0]-d[0]), 2) + pow((centro[1]-d[1]), 2))
if(distancia <= raio):
atingiu = True

if(atingiu == False and distancia == 0):
if(centro[0] > c[0]):
distancia = centro[0] - c[0]
if(distancia <= raio):
atingiu = True
elif(centro[0] < a[0]):
distancia = a[0] - centro[0]
if(distancia <= raio):
atingiu = True
elif(centro[1] > b[1]):
distancia = centro[1] - b[1]
if(distancia <= raio):
atingiu = True
elif(centro[1] < a[1]):
distancia = a[1] - centro[1]
if(distancia <= raio):
atingiu = True

if(distancia == 0):
atingiu = True

if(i != 0):
retorno = retorno + "\n"

if(atingiu == True):
retorno = retorno + str(dano)
else:
retorno = retorno + "0"

print(retorno)
6 changes: 6 additions & 0 deletions Python/2755.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# -*- coding: utf-8 -*-

print('"Ro\'b\'er to\\/"')
print('(._.) ( l: ) ( .-. ) ( :l ) (._.)')
print('(^_-) (-_-) (-_^)')
print('("_") (\'.\')')
25 changes: 25 additions & 0 deletions Python/2770.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-

saida = []

while True:
try:

ent = input().split()
ent[0] = int(ent[0])
ent[1] = int(ent[1])
ent[2] = int(ent[2])

for i in range(0,ent[2]):
placa = input().split()
placa[0] = int(placa[0])
placa[1] = int(placa[1])
if((placa[0] <= ent[0] and placa[1] <= ent[1]) or (placa[0] <= ent[1] and placa[1] <= ent[0])):
saida.append("Sim")
else:
saida.append("Nao")

except:
for i in saida:
print(i)
break
6 changes: 6 additions & 0 deletions Python/2802.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# -*- coding: utf-8 -*-

n = int(input())
r = 1 + (((n-1)*n)/2) + (((n) *(n - 1) *(n - 2 )* (n - 3))/24)

print(int(r))