Cho mảng số nguyên A[] gồm N phần tử, nhiệm vụ của bạn là tính trung bình cộng của các số là số nguyên tố trong dãy. Dữ liệu đảm bảo có ít nhất 1 phần tử là số nguyên tố trong dãy.
Đầu vào
Vector hàng gồm N số trong đó chắc chắn có chứa số nguyên tố
Giới hạn
1<=N<=1000
-10^3<=A[i]<=10^3
Đầu ra
In ra đáp án của bài toán
Ví dụ :
Input nums = [-911 234 151 347 231]
Output result = 249

Solution Stats

15 Solutions

10 Solvers

Last Solution submitted on Jan 31, 2026

Last 200 Solutions

Solution Comments

Show comments
Loading...

Problem Recent Solvers10

Suggested Problems

More from this Author14

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!