SHARE
TWEET

Untitled

a guest Sep 15th, 2019 103 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2. import javafx.scene.transform.Scale;
  3.  
  4. public class Main {
  5.  
  6.     public static void main(String[] args) {
  7.         Scanner leia = new Scanner(System.in);
  8.         int t;
  9.         int n;
  10.         String nomeDoTime;
  11.         int somaDosPontos = 0;
  12.         while (leia.hasNext()) {
  13.             t = leia.nextInt();
  14.             n = leia.nextInt();
  15.             String nomeDosTimesVetor[] = new String[t];
  16.             for (int i = 0; i < t; i++) {
  17.                 nomeDoTime = leia.next();
  18.                 nomeDosTimesVetor[i] = leia.next();
  19.                 somaDosPontos = somaDosPontos + Integer.parseInt(nomeDosTimesVetor[i]);
  20.             }
  21.  
  22.             System.out.println(3 * n - somaDosPontos);
  23.             somaDosPontos = 0;
  24.  
  25.         }
  26.     }
  27. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top