"SWEA 2068 최대수 구하기"의 두 판 사이의 차이

14번째 줄: 14번째 줄:
<source lang='java'>
<source lang='java'>
import java.util.Scanner;
import java.util.Scanner;
class Solution {
public class Solution {
    public static void main(String args[]) {
    static Scanner sc = new Scanner(System.in);
        Scanner sc = new Scanner(System.in);
    public static void main(String args[]) {
        int T = sc.nextInt();
        int T = sc.nextInt();
        for(int t=0; t<T; t++) {
        for(int tc=1; tc<=T; tc++) {
            int max = 0;
            int max = 0;
            for(int i=0; i<10; i++) {
            for(int i=0; i<10; i++) {
                int n = sc.nextInt();
                int n = sc.nextInt();
                if( n > max ) max = n;
                if( n > max ) max = n;
            }
            }
            System.out.format("#%d %d\n", t+1, max);
            System.out.format("#%d %d\n", tc, max);
        }
        }
    }
    }
}
}
</source>
</source>

2019년 1월 14일 (월) 02:16 판

1 개요

SWEA 2068 최대수 구하기
SW Expert 아카데미
# 문제 풀이

틀:SWEA 난이도 1-1

2 C++

3 Java

import java.util.Scanner;
public class Solution {
    static Scanner sc = new Scanner(System.in);
    public static void main(String args[]) {
        int T = sc.nextInt();
        for(int tc=1; tc<=T; tc++) {
            int max = 0;
            for(int i=0; i<10; i++) {
                int n = sc.nextInt();
                if( n > max ) max = n;
            }
            System.out.format("#%d %d\n", tc, max);
        }
    }
}
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}