SHARE
TWEET

Untitled

a guest Sep 16th, 2019 112 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package jsdfff;
  2. import java.util.Arrays;
  3. import java.util.Scanner;
  4. public class Aihdsfs {
  5.  
  6.     public static void main(String[] args) {
  7.         Scanner in = new Scanner (System.in);
  8.         int n;
  9.         n = in.nextInt();
  10.         in.nextLine();
  11.         String casas, placar;
  12.         String[] p = new String[2];
  13.         String[] s = new String[2];
  14.         int[] x = new int[2];
  15.         String[] y = new String[n];
  16.         String[] z = new String[n];
  17.        
  18.         for (int i=0; i<n; i++) {
  19.             casas = in.nextLine();
  20.             p = casas.split("x");
  21.             y[i] = p[0];
  22.             z[i] = p[1];
  23.         }
  24.        
  25.         for (int i=0; i<n; i++) {
  26.             placar = in.nextLine();
  27.             s = placar.split("-");
  28.             x[0] = Integer.parseInt(s[0]);
  29.             x[1] = Integer.parseInt(s[1]);
  30.             if (x[0] > x[1]) {
  31.                 System.out.println(y[i]);
  32.             } else if (x[1] > x[0]) {
  33.                 System.out.println(z[i]);
  34.             }
  35.         }
  36.        
  37.    
  38.        
  39.  
  40.    
  41.    
  42.        
  43.            
  44.     }
  45. }
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