문제N개의 정수 A[1], A[2], …, A[N]이 주어져 있을 때, 이 안에 X라는 정수가 존재하는지 알아내는 프로그램을 작성하시오.입력첫째 줄에 자연수 N(1≤N≤100,000)이 주어진다. 다음 줄에는 N개의 정수 A[1], A[2], …, A[N]이 주어진다. 다음 줄에는 M(1≤M≤100,000)이 주어진다. 다음 줄에는 M개의 수들이 주어지는데, 이 수들이 A안에 존재하는지 알아내면 된다. 모든 정수들의 범위는 int 로 한다.출력M개의 줄에 답을 출력한다. 존재하면 1을, 존재하지 않으면 0을 출력한다. 입력 5 4 1 5 2 3 5 1 3 7 9 5 출력1 1 0 0 1 def is_contain(arr, x): import bisect i = bisect.bisect_left(arr, ..
[가장 좋아하는 수] 철수는 4, 7 로만 이루어진 숫자를 좋아한다.4, 7로만 이루어진 숫자중에 n번째 작은 숫자들까지 구하라. example 1input: 2output:[4, 7] example 2input: 4output:[4, 7, 44, 47] 비트연산자 이용한 방법 (빠르다) def get_fav(n): repeat = 1 cur_size = 0 size_prev = cur_size while True: cur_size += (2**repeat) if n = max: return fav i += 1 return list() print(get_fav(int(input())))
Determine the season for a given date. You may assume that the start and end of each season is fixed to the dates given in the table below.seasonstart dateend datespring21 March20 Junesummer21 June22 Septemberautumn23 September20 Decemberwinter21 December20 MarchInputThe day d∈Nd∈N (1≤d≤311≤d≤31) and the name of the month for a given date, each on a separate line.OutputA sentence that describes ..
In chemistry, isomers are compounds that have the same number of atoms of each element, but that differ in the way these atoms are interconnected and arranged. In other words, isomers are compounds with the same molecular formulabut different structural formulas (a compound is also an isomer of itself). Isomers usually have different chemical properties.Ethanol (an alcohol) and dimethyl ether, f..
Apart from having a unique name, chemical elements are also identified by a unique symbolic representation. Chemical symbols are one or two letters from the Latin alphabet, but can be three letters when the element has a provisional name. Chemical symbols are written with an uppercase first letter, followed by zero ore more lowercase letters.Earlier chemical symbols stem from classical Latin and..
Friday the thirteenth is generally seen as an unlucky day in our culture. However, it is not immediately sure where this superstition comes from, and although there are numerous reports in various religions and customs, it seems that this superstition is at most 100 years old.The combination of the weekday Friday and the number thirteen is also not as universal as you might think. In Belgium, th..
Little Lena's book of puzzles contains the following challenge. The goal is to connect each fruit with the correct color.Because little Lena is a bit stubborn (or because she's too young), she takes pleasure in randomly connecting the fruits with the colors. However, she always makes sure that each fruit is connected with at most one color and that each color is connected with at most one fruit...
A zigzag sorted sequence of integers a0,a1,a2,a3,a4,…a0,a1,a2,a3,a4,… is a sequence wherea0≥a1≤a2≥a3≤a4≥…a0≥a1≤a2≥a3≤a4≥…In other words, the sequence alternates between larger and smaller integers: the first is larger than or equal to the second, the second is smaller than or equal to the third, the third is larger than or equal to the fourth, and so on. Here's an example of such a zigzag sorted..
- Total
- Today
- Yesterday
- gitlab
- 장고 카톡 자동응답
- admin.py
- virtualenv
- 파이썬 독학
- GIT
- 파이썬 프로그래밍
- django chatbot
- 엑셀 비교
- 플러스친구 자동응답
- pycrypto
- 파이썬 입문
- 장고
- 파이썬 강좌
- 장고 플러스친구 자동응답
- Tistory
- chatbot
- 파이썬
- 문과 코딩
- 면접정답
- Python
- 모바일 테마 적용
- 면접답변
- gitignore
- 문서 비교
- 모바일 스킨 적용
- wsgi
- PuTTYGen
- django
- 이미지 비교
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |