백준 1094 막대기
문제 : https://www.acmicpc.net/problem/1094
Swift :
var input = Int(readLine()!)! var res = 0 while input > 0{ if input%2 == 1{ res += 1 } input /= 2 } print(res)