공부하는 히욤이

2068. 최대수 구하기 본문

Algorithm/SW Expert Academy

2068. 최대수 구하기

히욤이 2019. 1. 10. 22:24

SW Expert 2068. 최대수 구하기

문제의 저작권은 SW Expert에 있습니다 


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import java.util.Scanner;
 
class Solution {
    public static void main(String args[]) {
 
        Scanner scanner = new Scanner(System.in);
        int T = scanner.nextInt();; //TestCase 개수
        int a = 0
        for (int test_case = 1; test_case <= T; test_case++) {
            int max = 0
            for (int i = 0; i < 10; i++) {
                a = scanner.nextInt(); //입력받는 수
                if (max<a) {
                    max = a; //최대값
                }
            }
 
            System.out.println("#" + test_case + " " + max );
        }
    }
}
cs


'Algorithm > SW Expert Academy' 카테고리의 다른 글

2019. 더블더블  (0) 2019.01.10
2070. 큰 놈, 작은 놈, 같은 놈  (0) 2019.01.10
2029. 몫과 나머지 출력하기  (0) 2019.01.10
1933. 간단한 N 의 약수  (0) 2019.01.10
2050. 알파벳을 숫자로 변환  (0) 2019.01.10