Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement