20250519 baekjoon
This commit is contained in:
parent
55bec15510
commit
397a1d25df
8
code_study/Baekjoon/python/10807.py
Normal file
8
code_study/Baekjoon/python/10807.py
Normal file
@ -0,0 +1,8 @@
|
||||
n = int(input())
|
||||
arr = list(input().split(" "))
|
||||
# v = input()
|
||||
# c = 0
|
||||
# for i in range(n):
|
||||
# if arr[i]==v : c+=1
|
||||
# print(c)
|
||||
print(arr.count(input()))
|
||||
6
code_study/Baekjoon/python/10810.py
Normal file
6
code_study/Baekjoon/python/10810.py
Normal file
@ -0,0 +1,6 @@
|
||||
n, m = map(int, input().split())
|
||||
arr = [0]*n
|
||||
for _ in range(m):
|
||||
i, j, k = map(int,input().split())
|
||||
arr[i-1:j] = [k]*(j-i+1)
|
||||
print(*arr)
|
||||
8
code_study/Baekjoon/python/10811.py
Normal file
8
code_study/Baekjoon/python/10811.py
Normal file
@ -0,0 +1,8 @@
|
||||
n, m = map(int,input().split())
|
||||
arr = list(range(1,n+1))
|
||||
temp = list()
|
||||
for _ in range(m):
|
||||
i, j = map(int, input().split())
|
||||
temp = arr[i-1:j]
|
||||
arr[i-1:j] = temp[::-1]
|
||||
print(*arr)
|
||||
8
code_study/Baekjoon/python/10813.py
Normal file
8
code_study/Baekjoon/python/10813.py
Normal file
@ -0,0 +1,8 @@
|
||||
n, m = map(int, input().split())
|
||||
arr = list(range(1,n+1))
|
||||
for _ in range(m):
|
||||
i, j = map(int, input().split())
|
||||
temp = arr[i-1]
|
||||
arr[i-1] = arr[j-1]
|
||||
arr[j-1] = temp
|
||||
print(*arr)
|
||||
3
code_study/Baekjoon/python/10818.py
Normal file
3
code_study/Baekjoon/python/10818.py
Normal file
@ -0,0 +1,3 @@
|
||||
n = int(input())
|
||||
arr = list(map(int, input().split(" ")))
|
||||
print(min(arr), max(arr))
|
||||
4
code_study/Baekjoon/python/10871.py
Normal file
4
code_study/Baekjoon/python/10871.py
Normal file
@ -0,0 +1,4 @@
|
||||
n, x = map(int, input().split(" "))
|
||||
arr = list(map(int, input().split(" ")))
|
||||
for i in range(n):
|
||||
if arr[i] < x : print(arr[i], end=" ")
|
||||
5
code_study/Baekjoon/python/1546.py
Normal file
5
code_study/Baekjoon/python/1546.py
Normal file
@ -0,0 +1,5 @@
|
||||
n = int(input())
|
||||
arr = list(map(int, input().split()))
|
||||
m = max(arr)
|
||||
arr = [arr[i]/m*100 for i in range(n)]
|
||||
print(sum(arr)/n)
|
||||
7
code_study/Baekjoon/python/2562.py
Normal file
7
code_study/Baekjoon/python/2562.py
Normal file
@ -0,0 +1,7 @@
|
||||
max = 0
|
||||
for i in range(9):
|
||||
n = int(input())
|
||||
if max < n :
|
||||
max = n
|
||||
idx = i+1
|
||||
print(max, idx,sep="\n")
|
||||
4
code_study/Baekjoon/python/3052.py
Normal file
4
code_study/Baekjoon/python/3052.py
Normal file
@ -0,0 +1,4 @@
|
||||
arr = set()
|
||||
for i in range(10):
|
||||
arr.add(int(input())%42)
|
||||
print(len(arr))
|
||||
4
code_study/Baekjoon/python/5597.py
Normal file
4
code_study/Baekjoon/python/5597.py
Normal file
@ -0,0 +1,4 @@
|
||||
arr = list(range(1,31))
|
||||
for _ in range(28):
|
||||
arr.remove(int(input()))
|
||||
print(*arr, sep="\n")
|
||||
Loading…
x
Reference in New Issue
Block a user