백준 #28490번 Area

jhj·2024년 2월 17일

백준 JAVA

목록 보기
365/583
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		int[] a = new int[n];
		
		for(int i = 0; i < n; i++) {
			int b = sc.nextInt();
			int c = sc.nextInt();
			a[i] = b * c;
		}
		
		int max = a[0];
		for(int i = 1; i < n; i++) {
			max = Math.max(max, a[i]);
		}
		
		System.out.println(max);
		sc.close();
	}
}
profile
개발자를 꿈꾸는

0개의 댓글