import java.text.DecimalFormat; public class Main { public static void main(String[] args) { // please define the JAVA input here. For example: Scanner s = new Scanner(System.in); String[] strings = s.nextLine().split(" "); int n = strings.length; int weight =0; for (int i = 0; i < n; i++) { weight += strings[i].length(); } double result = (double)weight/n; result = (double) Math.round(result * 100)/100; DecimalFormat df = new DecimalFormat("#.##"); System.out.println(df.format(result)); // please finish the function body here. // please define the JAVA output here. For example: System.out.println(s.nextInt()); } } 部分通过 (68%通过, 未通过用例答案错误) 不知道因为什么

相关推荐

牛客网
牛客网在线编程
牛客网题解
牛客企业服务