Skip to content

Commit 611cd91

Browse files
committed
Solved: 10807 개수 세기
1 parent e4feacf commit 611cd91

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import sys
2+
input = sys.stdin.readline
3+
4+
N = int(input()) # 숫자 개수 입력 받기
5+
num = list(map(int, input().split())) # 숫자 리스트 입력 받기
6+
v = int(input()) # 찾을 숫자 입력 받기
7+
8+
count = 0 # 찾은 숫자 개수 초기화
9+
10+
for i in range(N):
11+
if num[i] == v : # 현재 숫자가 찾는 숫자와 같은지 확인
12+
count += 1 # 같으면 개수 증가
13+
14+
print(count) # 결과 출력 (찾은 숫자의 개수)

0 commit comments

Comments
 (0)