== Status == ||Problem|| 2453||User||talin0528|| ||Memory||3656K||Time||375MS|| ||Language||Java||Result||Accepted|| == Idea == bit 연산이 익숙치가 않아, 10진수 -> 2진수 변환해서 배열에 넣었습니다ㅠㅠ(끝내고 다시 반대로..;ㅁ;..이런 비효율적인!) 1이란 숫자를 찾았을 때 그 앞의 숫자가 0이면 1을 앞으로 보내고, 1이면 맨 끝쪽으로 보내는... ex) 0010 0000 -> 0100 0000 0011 1100 -> 0100 0111 == Source Code == {{{ import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); while(sc.hasNextInt()){ int i = sc.nextInt(); if(i == 0) break; printJ(i); } } private static void printJ(int i){ int [] bin = binI(i); int num = 0, count=0; while(num0){ temp[num++] = i%2; i = i/2; } return temp; } } }}} == Trial and error == * Compile error * 클래스 이름은 항상 "Main"으로 해주어야 합니다. 깜찍한 poj 같으니:) * Runtime error * printJ 함수 내에서 while(num