We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4feacf commit 611cd91Copy full SHA for 611cd91
jaykxo/week02/10807_개수_세기.py
@@ -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