Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- import javafx.scene.transform.Scale;
- public class Main {
- public static void main(String[] args) {
- Scanner leia = new Scanner(System.in);
- int t;
- int n;
- String nomeDoTime;
- int somaDosPontos = 0;
- while (leia.hasNext()) {
- t = leia.nextInt();
- n = leia.nextInt();
- String nomeDosTimesVetor[] = new String[t];
- for (int i = 0; i < t; i++) {
- nomeDoTime = leia.next();
- nomeDosTimesVetor[i] = leia.next();
- somaDosPontos = somaDosPontos + Integer.parseInt(nomeDosTimesVetor[i]);
- }
- System.out.println(3 * n - somaDosPontos);
- somaDosPontos = 0;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement