diff --git "a/YoungjinShin/3\354\243\274\354\260\250/mathTest.java" "b/YoungjinShin/3\354\243\274\354\260\250/mathTest.java" new file mode 100644 index 0000000..1e10676 --- /dev/null +++ "b/YoungjinShin/3\354\243\274\354\260\250/mathTest.java" @@ -0,0 +1,53 @@ +import java.util.*; + + +public class mathTest{ + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + int testCase = sc.nextInt(); + int[] answer = new int[testCase]; + for(int i = 0; i tempanswer = new ArrayList<>(); + + int max = Arrays.stream(ansCount).max().getAsInt(); + + for (int i = 0; i < ansCount.length; i++){ + if (ansCount[i] == max){ + tempanswer.add(i+1); + } + } + int[] answer = tempanswer.stream().mapToInt(i -> i).toArray(); + + return answer; + } +} \ No newline at end of file