简体中文
Telegram

帖子import java.util.*;

2025年2月20日
D
Deloitte | COGNIZANT | IBM | CAPGEMINI
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int K = sc.nextInt(); int[] arr = new int[N]; for (int i = 0; i < N; i++) { arr[i] = sc.nextInt(); } double avg= 0; int sum = 0; for (int i = 0; i < K; i++) { sum += arr[i]; } avg = (double) sum / K; for (int i = K; i < N; i++) { sum = sum - arr[i - K] + arr[i]; double cur = (double) sum / K; if (cur > avg) { avg = cur; } } System.out.printf("%.2f\n", avg); sc.close(); } } #BIRLASOFT
930 ·

信息流中的邻近内容

DDeloitte | COGNIZANT | IBM | CAPGEMINIAmazon exam ✅✅ Contact: @MLCODER2DDeloitte | COGNIZANT | IBM | CAPGEMINIBIRLASOFT CODING ✅✅✅ CONTACT: @MLCODER2
这条消息
DDeloitte | COGNIZANT | IBM | CAPGEMINIpublic class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n= sc.nextInt(); int x=sc.nextInt(); int[] arr=new int[n];DDeloitte | COGNIZANT | IBM | CAPGEMINICOGNIZANT EXAM CLEARED ✅✅✅ CONTACT: @MLCODER2

来自搜索索引的公开信息流 ChatCrawler ——“公开 Telegram 的 Google”;随着该社群被抓取而更新。 时间为 UTC。

仅限公开内容,使用 Telegram 官方 API。 关于 · 常见问题 · 索引限制 · 移除页面 · 目录 · 搜索 · 计算方法