This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
import java.util.ArrayList; | |
/** | |
* Created by Wook on 2015-12-29. | |
*/ | |
public class Sudoku{ | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); | |
ArrayList<Integer> arrList = new ArrayList<>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int size = 3; | |
int[] arrSudoku = new int[size]; | |
for (int i = 1; i <= size; i++) | |
arrSudoku[i - 1] = i; | |
sudoku(arrSudoku, size, 0, arrList); | |
sudokuPrint(arrList, size); | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int[] arrSudoku = new int[size]; | |
for (int i = 1; i <= size; i++) | |
arrSudoku[i - 1] = i; | |
sudoku(arrSudoku, size, 0, arrList); | |
sudokuPrint(arrList, size); | |
} | |
public static void sudoku(int[] arr, int size, int pStart, ArrayList<Integer> arrList) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void perm(String head, String input, int size, ArrayList<String> arr) throws Exception{ | |
// Random random = new Random(); | |
if (input.length() <= 1) { | |
arr.add(head+input); | |
// for(int i = 0; i < size; i++) { | |
// int num = random.nextInt(size-1)+1; | |
// System.out.println(arr.get(num)); | |
// arr.remove(num); | |
// size--; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
/** | |
* Created by Wook on 2015-12-27. | |
* [원 모양 찍기] | |
* Algorithm | |
* 1. 정사각형을 찍는다. | |
* 2. 첫째 줄과 마지막 줄에서 별을 빼주면 곡선처럼 보이게 된다. | |
* 3. 원 크기 입력이 홀수냐, 짝수냐에 따라 달라진다. | |
* 4. 범위 계산해주는 것이 중요하다. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package cosmos.solarsystem; | |
import cosmos.cygnus.*; | |
/** | |
* Created by Wook on 2015-12-10. | |
*/ | |
public class D5_Solar { | |
public static void main(String[] args) { | |
Sun sun = new Sun(); | |
Vega vega = new Vega(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package cosmos.cygnus; | |
/** | |
* Created by Wook on 2015-12-10. | |
*/ | |
public class Vega { | |
public String getName() { | |
return "베가"; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package cosmos.solarsystem; | |
import cosmos.cygnus.*; | |
/** | |
* Created by Wook on 2015-12-10. | |
*/ | |
public class D5_Solar { | |
public static void main(String[] args) { | |
Sun sun = new Sun(); | |
Vega vega = new Vega(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Wallet { | |
int paperCount; | |
int cardCount; | |
String cardName; | |
String wColors; | |
boolean isPaper; | |
} |