Skip to content

Instantly share code, notes, and snippets.

@mingyu-lee
Last active July 19, 2018 03:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mingyu-lee/cbd9b911e5679d222594b160e1d38ec0 to your computer and use it in GitHub Desktop.
Save mingyu-lee/cbd9b911e5679d222594b160e1d38ec0 to your computer and use it in GitHub Desktop.
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));
}
}
@mingyu-lee
Copy link
Author

문제 풀이 소감 :
처음에는 프로그래밍을 처음 배울 때 처럼 반복문도 써보고 여러줄에 걸쳐 코딩을 했으나
리팩토링을 통해 한줄로 줄이는 것도 재밌었다.
Scanner가 메모리를 더 잡아먹는데 BufferedInputStream을 사용하는 것으로도 바꿔봐야겠다.

체감 난이도 :
쉬움

어려웠던 점 :
없었음

앞으로 필요할 것 같은 공부 :
Scanner와 BufferedInputStream 차이

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment