标签:java system.in oid ati max close port sharp sha
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(sc.hasNext()) { String line = sc.nextLine(); String[] arr = line.split("[^0-9]+"); int max = 0; String result = ""; for(int i = 0; i < arr.length; i++) { int len = arr[i].length(); if(len >= max) { result = arr[i]; max = len; } } System.out.println(result); } sc.close(); } }
标签:java system.in oid ati max close port sharp sha
原文地址:https://www.cnblogs.com/chenxiaobo/p/9465428.html