Advertisement
Nevtr4l

Base Java (Casos múltiples)

Aug 27th, 2024 (edited)
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.54 KB | None | 0 0
  1. import java.util.*;
  2.  
  3. public class Main {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.         // leer numero de casos
  7.         int t = scanner.nextInt();
  8.         scanner.nextLine();
  9.        
  10.         for (int i = 0; i < t; i++) {
  11.             solve(scanner);
  12.         }
  13.        
  14.         scanner.close();
  15.     }
  16.  
  17.     private static void solve(Scanner scanner) {
  18.         // aqui va tu codigo
  19.         String leerLinea = scanner.nextLine();
  20.         System.out.println(leerLinea);
  21.     }
  22. }
Tags: Java
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement