Level1) 폰켓몬
1234567891011121314151617import java.util.*; public class Level1_폰켓몬 { public static int solution(int[] nums) { Set set = new HashSet(); for (int num : nums) { set.add(num); } return Math.min(set.size(), nums.length/2); } public static void main(String[] args) { int[] nums = {3,3,3,2,2,4}; System.out.println(solution(nums)); }}Colored by Color Scriptercs
PS/programmers
2021. 5. 1. 10:57
링크
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- 백기선 스터디
- 킹수빈닷컴
- 이펙티브자바
- http
- JPA 연관관계 매핑
- GCP
- 패스트캠퍼스 컴퓨터공학 완주반
- dreamcoding
- js array
- 프로그래머스 SQL
- 이펙티브자바 아이템59
- 김영한 JPA
- java
- HTTP 완벽가이드
- ㅇㄷㅇㅈ
- JS 딥다이브
- 모던자바스크립트
- 프로그래머스
- 이펙티브자바 스터디
- 백준
- 이펙티브자바 아이템60
- js api
- 드림코딩
- 가상 면접 사례로 배우는 대규모 시스템 설계 기초
- REST API
- Spring Security
- 김영한 http
- HTTP 완벽 가이드
- BOJ
- js promise
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
글 보관함