338. Counting BitsLeetCode Given an integer n, return an array ans of length n + 1 such that for each i (0 정수 n이 주어졌을 때, 0 ExampleInput: n = 2 Output: [0,1,1] Explanation: 0 --> 0 1 --> 1 2 --> 10Input: n = 5 Output: [0,1,1,2,1,2] Explanation: 0 --> 0 1 --> 1 2 --> 10 3 --> 11 4 --> 100 5 --> 1011. 문제 요구사항 분석0 ~ n 까지 이진수로 표현한 후, 1의 개수 구하기 2. 접근 전략파이썬은 bin이라고 제공되고 있는 함수가 있기 때문에 파이썬으로 1차 구현 후, 자바..