프로그래밍/Codility10 [c#] codility - BinaryGap ...더보기 using System; // you can also use other imports, for example: // using System.Collections.Generic; // you can write to stdout for debugging purposes, e.g. // Console.WriteLine("this is a debug message"); class Solution { public int solution(int N) { var binary = Convert.ToString(N,2).ToCharArray(); int count = 0, max = 0; for (var i = 0; i < binary.Length; i++) { char a = binary[i]; if (a.. 2019. 8. 28. 이전 1 2 다음 반응형