Skip to content

Commit 6226f2c

Browse files
authored
18/05/2019
1 parent 763ec23 commit 6226f2c

20 files changed

+219
-0
lines changed

1930.py

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
a, b, c, d = (raw_input()).split(' ')
2+
print int(a) + int(b) + int(c) + int(d) - 3

1933.py

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
a, b = (raw_input()).split(' ')
2+
a = int(a)
3+
b = int(b)
4+
5+
if a == b:
6+
print a
7+
else:
8+
if b > a:
9+
print b
10+
else:
11+
print a

1957.py

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
a = int(input())
2+
print hex(a).replace('0x', '').upper()

1963.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
x, y = (raw_input()).split(' ')
2+
x = float(x)
3+
y = float(y)
4+
5+
p = 100/x*y-100
6+
print('{:.2f}%').format(p)

1983.py

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
x = input()
2+
m = 0
3+
n = 0
4+
5+
for i in range(x):
6+
y, z = (raw_input()).split(' ')
7+
if float(z) > m:
8+
m = float(z)
9+
n = y
10+
11+
if m < 8:
12+
print "Minimum note not reached"
13+
else:
14+
print n

1985.py

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
x = input()
2+
t = 0
3+
4+
for i in range(x):
5+
y, z = (raw_input()).split(' ')
6+
if y == '1001':
7+
t += 1.5 * int(z)
8+
elif y == '1002':
9+
t += 2.5 * int(z)
10+
elif y == '1003':
11+
t += 3.5 * int(z)
12+
elif y == '1004':
13+
t += 4.5 * int(z)
14+
else:
15+
t += 5.5 * int(z)
16+
17+
print ('{:.2f}').format(t)

2006.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
x = raw_input()
2+
n = 0
3+
for e in (raw_input()).split(' '):
4+
if e == x:
5+
n += 1
6+
print n

2028.py

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
c = 1
2+
3+
while True:
4+
try:
5+
x = input()
6+
t = ""
7+
8+
for i in range(x + 1):
9+
if i == 0:
10+
t += "0 "
11+
else:
12+
for i2 in range(i):
13+
t += str(i) + " "
14+
15+
t = t[0: len(t) - 1]
16+
n = len(t.split(' '))
17+
if len(t.split(' ')) == 1:
18+
print "Caso " + str(c) + ": " + str(n) + " numero"
19+
else:
20+
print "Caso " + str(c) + ": " + str(n) + " numeros"
21+
print t
22+
print ""
23+
24+
c += 1
25+
except EOFError:
26+
break

2057.py

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
a, b, c = (raw_input()).split(' ')
2+
a = int(a)
3+
b = int(b)
4+
c = int(c)
5+
6+
r = a + b + c
7+
8+
if r >= 24:
9+
print r - 24
10+
elif r < 0:
11+
print r + 24
12+
else:
13+
print r

2059.py

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
a, b, c, d, e = (raw_input()).split(' ')
2+
a = int(a)
3+
b = int(b)
4+
c = int(c)
5+
d = int(d)
6+
e = int(e)
7+
8+
if e == 1 and d == 1:
9+
print "Jogador 2 ganha!"
10+
elif d == 1:
11+
print "Jogador 1 ganha!"
12+
else:
13+
if (b + c) % 2 == 0:
14+
if a == 1:
15+
print "Jogador 1 ganha!"
16+
else:
17+
print "Jogador 2 ganha!"
18+
else:
19+
if a == 0:
20+
print "Jogador 1 ganha!"
21+
else:
22+
print "Jogador 2 ganha!"

2060.py

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
x = input()
2+
x = (raw_input()).split()
3+
4+
m2 = 0
5+
m3 = 0
6+
m4 = 0
7+
m5 = 0
8+
9+
for y in x:
10+
y = int(y)
11+
if y % 2 == 0:
12+
m2 += 1
13+
if y % 3 == 0:
14+
m3 += 1
15+
if y % 4 == 0:
16+
m4 += 1
17+
if y % 5 == 0:
18+
m5 += 1
19+
20+
print str(m2) + " Multiplo(s) de 2"
21+
print str(m3) + " Multiplo(s) de 3"
22+
print str(m4) + " Multiplo(s) de 4"
23+
print str(m5) + " Multiplo(s) de 5"

2061.py

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
x, y = (raw_input()).split(' ')
2+
x = int(x)
3+
y = int(y)
4+
5+
for i in range(y):
6+
z = raw_input()
7+
if z == 'fechou':
8+
x += 1
9+
else:
10+
x -= 1
11+
12+
print x

2140.py

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
while True:
2+
x, y = (raw_input()).split(' ')
3+
4+
if x == "0" and y == "0":
5+
break
6+
7+
t = int(y) - int(x)
8+
p = False
9+
n = [2, 5, 10, 20, 50, 100]
10+
11+
for e in n:
12+
for e2 in n:
13+
if e + e2 == t:
14+
p = True
15+
break
16+
if p == True:
17+
break
18+
19+
if p == True:
20+
print "possible"
21+
else:
22+
print "impossible"

2146.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
while True:
2+
try:
3+
x = input()
4+
print x - 1
5+
except EOFError:
6+
break

2147.py

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
x = input()
2+
3+
for i in range(x):
4+
y = raw_input()
5+
print('{:.2f}').format(0.01 * len(y))

2152.py

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
x = input()
2+
3+
for i in range(x):
4+
a, b, c = raw_input().split(' ')
5+
6+
if len(a) == 1:
7+
a = "0" + a
8+
9+
if len(b) == 1:
10+
b = "0" + b
11+
12+
if c == "1":
13+
print a + ":" + b + " - A porta abriu!"
14+
else:
15+
print a + ":" + b + " - A porta fechou!"

2159.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import math
2+
n = input()
3+
print '{:.1f}'.format(n/(math.log(n))) + ' {:.1f}'.format(1.25506 * (n/(math.log(n))))

2160.py

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
x = raw_input()
2+
if len(x) <= 80:
3+
print "YES"
4+
else:
5+
print "NO"

2164.py

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import math
2+
n = input()
3+
a1 = math.pow((1+math.sqrt(5))/2.0, n)
4+
a2 = math.pow((1-math.sqrt(5))/2.0, n)
5+
print '{:.1f}'.format((a1 - a2) / math.sqrt(5))

2165.py

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
if len(raw_input()) <= 140:
2+
print "TWEET"
3+
else:
4+
print "MUTE"

0 commit comments

Comments
 (0)