#K70567. Baking Fundraiser Target Check

    ID: 33337 Type: Default 1000ms 256MiB

Baking Fundraiser Target Check

Baking Fundraiser Target Check

You are organizing a baking fundraiser event. Over a period of n days, a certain amount of money is raised each day by selling pastries. Given the target amount P (in dollars) and the list of amounts raised each day, your task is to determine whether the total money raised meets or exceeds the target.

Formally, let \( \text{Total} = \sum_{i=1}^{n} a_i \) where \( a_i \) is the amount raised on day \( i \). If \( \text{Total} \ge P \), output ACHIEVED; otherwise, output NOT ACHIEVED.

inputFormat

The first line contains two integers n and P separated by space, where n is the number of days and P is the target amount in dollars. The second line contains n integers, representing the amount raised each day.

outputFormat

Output a single line with either "ACHIEVED" if the total money raised is at least P dollars, or "NOT ACHIEVED" otherwise.## sample

5 50
10 20 10 5 5
ACHIEVED