-
Notifications
You must be signed in to change notification settings - Fork 4
240604 이승환 0x03 0x04 풀이 #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니다!!
public class Main { | ||
public static void main(String[] args) throws IOException { | ||
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); | ||
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BufferWriter 를 활용하는 부분이 성능을 향상키는군요!
int start = 0; | ||
int end = arr.length - 1; | ||
int count = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
투포인터로 수를 비교하여 범위를 좁혀나가는 방법이 정말 좋아보입니다. 👍
if (answer[6] > answer[9]) | ||
answer[9]++; | ||
else | ||
answer[6]++; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6과 9 자리를 균형있게 배분하는 풀이가 저랑 다른 접근 방식이라 새로워요! 저는 따로 변수를 사용하여 풀이했어요
No description provided.