Cho mảng số nguyên A[] gồm N phần tử và số nguyên X , hãy đếm xem trong mảng có bao nhiêu số lớn hơn X và bao nhiêu số nhỏ hơn X.
Đầu vào
Dòng thứ 1 gồm N số nguyên viết cách nhau một vài khoảng trắng
Dòng thứ 2 là số nguyên X
Giới hạn
1<=N<=1000
-10^3<=A[i]<=10^3
Đầu ra
Dòng 1 in ra các số nhỏ hớn X, dòng 2 in ra các số lớn hơn X
Ví dụ :
nums = [-798 183 434 850 555];
correct_answer = [1 4];

Solution Stats

14 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!