본문 바로가기
Beakjoon&프로그래머스/Java

[백준/Java] 24736번 Football Scoring

by 현장 2022. 4. 15.

-Code

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] point = {6, 3, 2, 1, 2};
        int[] score = {0, 0};

        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < 5; j++) {
                score[i] += sc.nextInt() * point[j];
            }
        }

        System.out.println(score[0] + " " + score[1]);
    }
}