Head vs breakz
[code] - 백준 1차열배열 10818,2582,2577,3053,1546,8958,4344 python 본문
10818
#1차원 배열
#10818
a = int(input())
b = list(map(int, input().split()))
print(str(min(b))+" "+str(max(b)))
2582
#2562
a = []
for i in range(9):
b = int(input())
a.append(b)
print(max(a))
print(a.index(max(a))+1)
2577
#2577
a = int(input())
b = int(input())
c = int(input())
d = a*b*c
e = list(str(d))
for i in range(10):
print(e.count(str(i)))
3053
#3053
a = []
for i in range(10):
b = int(input())
c = b%42
a.append(c)
print(len(set(a)))
1546
#1546
N = int(input())
score = list(map(int, input().split()))
print((sum(score, 0.0)/len(score))/max(score)*100)
8958
#8958
a = int(input())
for i in range(a):
b = list(str(input()))
c = 0
d = 0
for j in range(len(b)):
if b[0] == "O":
c += 1
d += c
b.pop(0)
else :
b.pop(0)
c = 0
print(d)
4344
#4344
a = int(input())
for i in range(a):
b = list(map(int,input().split()))
c = b.pop(0)
d = sum(b)/len(b)
e = 0
for i in range(len(b)):
if b[i] > d :
e += 1
f = (e/len(b))*100
print('%.3f' %f+"%")
'Head > Code' 카테고리의 다른 글
[code] - 백준 문자열 11654,11720,10809,2675,1157,1152,2908,5622,2941,1316번 python (0) | 2020.04.04 |
---|---|
[code] - 백준 함수 15596,4673,1065번 python (0) | 2020.04.03 |
[code] - 백준 실습1 10039,5543,10817,2523,2446,10996, python (0) | 2020.03.19 |
[code] - 백준 while문 10952,10951,1110 python (0) | 2020.03.18 |
[code] - 백준 for문 2739,10950,8393,15552,2741,2742,11021,11022,2438,2439,10871 python (0) | 2020.03.16 |
Comments