-
Notifications
You must be signed in to change notification settings - Fork 0
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
[프로그래머스] 레벨1 오답노트 #4
Comments
sanhee
added a commit
that referenced
this issue
Jul 15, 2021
#3 #4 감이안와서 답지를 참고했다.. s.substring(j*i, (j*i)+i) 을 통해서 문자열을 분리하는 건 정말 신기했다! https://fbtmdwhd33.tistory.com/226
sanhee
added a commit
that referenced
this issue
Jul 15, 2021
#3 #4 감이안와서 답지를 참고했다.. s.substring(j*i, (j*i)+i) 을 통해서 문자열을 분리하는 건 정말 신기했다! https://fbtmdwhd33.tistory.com/226
sanhee
added a commit
that referenced
this issue
Jul 18, 2021
#1 #4 특별하게 생각하진 않고.. 반복문 순회로 풀었다.. 아래 코드 람다식으로 푼 참고 코드인데 다음에 한번 해보자! ```java class Solution { public int[] solution(int[] lottos, int[] winNums) { return LongStream.of( (lottos.length + 1) - Arrays.stream(lottos).filter(l -> Arrays.stream(winNums).anyMatch(w -> w == l) || l == 0).count(), (lottos.length + 1) - Arrays.stream(lottos).filter(l -> Arrays.stream(winNums).anyMatch(w -> w == l)).count() ) .mapToInt(op -> (int) (op > 6 ? op - 1 : op)) .toArray(); } } ```
sanhee
added a commit
that referenced
this issue
Jul 22, 2021
#1 #4 Integer.parseInt 진법변환 완전 간단하게 할 수 있구나.. 처음 알았다. ```java package com.example.programmers.레벨1._3진법뒤집기; // 02:24 public class Solution { public int solution(int n) { StringBuilder sb = new StringBuilder(); while (n>0) { sb.append(n%3); n = n / 3; } return Integer.parseInt(sb.toString(),3); } } ```
sanhee
added a commit
that referenced
this issue
Jul 24, 2021
sanhee
added a commit
that referenced
this issue
Jul 24, 2021
다음부터는 틀린 것만 기록되게 해야겠다. (너무 많아져서 보기힘들듯..) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: