diff --git a/week10/clean2001/.gitkeep b/week10/clean2001/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/week10/clean2001/B1522.java b/week10/clean2001/B1522.java new file mode 100644 index 0000000..b972eab --- /dev/null +++ b/week10/clean2001/B1522.java @@ -0,0 +1,35 @@ +// 1522. 문자열 교환 +import java.io.*; +import java.util.*; + +class Main { + static String line; + public static void main(String[] args) throws Exception { + BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); + + line = br.readLine(); + + // a의 개수를 세어준다. + int cnt = 0; + for(int i=0; i 즉 N이 이진수 몇개로 이뤄져있는지 + int n = (int)(log(N) / log(2)); + for(int i=n; i>0; --i) { + if((N & (1L<