Skip to content

Instantly share code, notes, and snippets.

View mingyu-lee's full-sized avatar

Mingyu Lee mingyu-lee

View GitHub Profile
@mingyu-lee
mingyu-lee / RestTemplateHelper.java
Created April 22, 2020 07:34 — forked from slmanju/RestTemplateHelper.java
Generic RestTemplate wrapper
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.type.CollectionType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
@mingyu-lee
mingyu-lee / ROT13_2.java
Created August 23, 2018 14:25
BOJ_11655_ROT13_개선
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
* ROT13 카이사르 암호
*
* Problem
* ROT13은 카이사르 암호의 일종으로 영어 알파벳을 13글자씩 밀어서 만든다.
*
@mingyu-lee
mingyu-lee / PrimeWord.java
Last active August 23, 2018 15:02
BOJ_2153_PrimeWord
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
* Problem
* 소수란 1과 자기 자신으로만 나누어떨어지는 수를 말한다. 예를 들면 1, 2, 3, 5, 17, 101, 10007 등이 소수이다. 이 문제에서는 편의상 1도 소수로 하자.
*
* 알파벳 대소문자로 이루어진 영어 단어가 하나 있을 때, a를 1로, b를 2로, …, z를 26으로, A를 27로, …, Z를 52로 하여 그 합을 구한다. 예를 들어 cyworld는 합을 구하면 100이 되고, abcd는 10이 된다.
*
@mingyu-lee
mingyu-lee / ROT13.java
Created August 21, 2018 14:22
BOJ_11655_ROT13
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class ROT13 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
char[] chars = br.readLine().trim().toCharArray();
int len = chars.length;
@mingyu-lee
mingyu-lee / OrderAge.java
Last active July 29, 2018 04:29
BOJ_10814_OrderAge
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
public class OrderAge {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int numberOfMember = Integer.parseInt(br.readLine());
@mingyu-lee
mingyu-lee / OrderCoordinate.java
Created July 24, 2018 13:05
BOJ_11650_OrderCoordinate
package boj;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
public class OrderCoordinate {
public static void main(String[] args) throws IOException {
@mingyu-lee
mingyu-lee / OrderAscN.java
Created July 24, 2018 12:25
BOJ_2750_OrderAscN
package boj;
import java.util.Arrays;
import java.util.Scanner;
public class OrderAscN {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int numberOfInput = Integer.parseInt(sc.nextLine());
@mingyu-lee
mingyu-lee / Bracket.java
Created July 19, 2018 03:07
BOJ_2504_Value of Bracket
import java.util.Scanner;
import java.util.Stack;
public class Main {
private static final String OPEN_BRACKET = "(";
private static final String CLOSE_BRACKET = ")";
private static final String OPEN_SQUARE_BRACKET = "[";
private static final String CLOSE_SQUARE_BRACKET = "]";
private static final String BRACKET_VALUE = "2";
@mingyu-lee
mingyu-lee / SangsuAnswer.java
Created July 17, 2018 09:47
BOJ_2908_Sangsu's Answer
import java.util.Scanner;
public class SangsuAnswer {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String[] inputs = sc.nextLine().split(" ");
int maxNumber = 0;
for (int i = 0; i < inputs.length; i++) {
int number = Integer.parseInt(String.valueOf(new StringBuilder(inputs[i]).reverse()));
@mingyu-lee
mingyu-lee / ASCII.java
Last active July 19, 2018 03:13
BOJ_11654_ASCII
import java.util.Scanner;
public class ASCII {
public static void main(String[] args) {
System.out.println((int)new Scanner(System.in).nextLine().charAt(0));
}
}