목록전체 글 (208)
YJ의 새벽

import java.util.Arrays; import java.util.Collections; class Solution { public long solution(long n) { long answer = 0; String[] arr = Long.toString(n).split(""); Arrays.sort(arr,Collections.reverseOrder()); String value = ""; for(int i=0; i

class Solution { public int solution(int[] d, int budget) { int answer = 0; int sum = 0; Arrays.sort(d); for( int i=0; i budget) { answer = i; break; } } if( sum

class Solution { public int[] solution(int []arr) { int[] answer = {}; int value = -3; List list = new ArrayList(); for(int i=0; i

class Solution { public int[] solution(int n, int m) { int[] answer = new int[2]; int val1 = 0; int val2 = 0; for(int i=1; i

class Solution { public int[][] solution(int[][] arr1, int[][] arr2) { for(int i=0; i

class Solution { public boolean solution(String s) { boolean answer = true; if( s.length()!=4 && s.length()!=6) { answer = false; } for(int i=0; i

class Solution { public long solution(int price, int money, int count) { long answer = -1; long sum = 0; for(int i=1; i sum) { answer = 0; }else { answer = sum - money; } return answer; } }