Last active
July 19, 2018 03:13
-
-
Save mingyu-lee/cbd9b911e5679d222594b160e1d38ec0 to your computer and use it in GitHub Desktop.
BOJ_11654_ASCII
This file contains 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; | |
public class ASCII { | |
public static void main(String[] args) { | |
System.out.println((int)new Scanner(System.in).nextLine().charAt(0)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
문제 풀이 소감 :
처음에는 프로그래밍을 처음 배울 때 처럼 반복문도 써보고 여러줄에 걸쳐 코딩을 했으나
리팩토링을 통해 한줄로 줄이는 것도 재밌었다.
Scanner가 메모리를 더 잡아먹는데 BufferedInputStream을 사용하는 것으로도 바꿔봐야겠다.
체감 난이도 :
쉬움
어려웠던 점 :
없었음
앞으로 필요할 것 같은 공부 :
Scanner와 BufferedInputStream 차이