#K59737. Loyalty Points Assignment
Loyalty Points Assignment
Loyalty Points Assignment
You are given a list of integers representing the total spending of each customer. Your task is to compute the loyalty points for each customer based on their spending. The rules for assigning loyalty points are as follows:
If a customer's spending \( s \) satisfies \( s > 1000 \), they receive 50 points.
If \( s \) lies in the inclusive range \( 500 \leq s \leq 1000 \), they receive 30 points.
If \( s < 500 \), they receive 0 points.
Output the corresponding loyalty points for each customer, preserving the input order.
inputFormat
The first line of the input contains a single integer \( n \) representing the number of customers. The second line contains \( n \) space-separated integers, where each integer indicates the total spending of a customer.
outputFormat
Output a single line containing \( n \) space-separated integers, where each integer is the loyalty points assigned to the corresponding customer.
## sample5
1500 750 400 1001 500
50 30 0 50 30