Advertisement
jbn6972

Unique Sequnce

Dec 5th, 2021
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. for _ in range(int(input())):
  2. n = int(input())
  3. nos = list(map(int,input().split()))
  4. uniq = set(nos)
  5. is_uniq = True
  6. for val in uniq:
  7. if nos.count(val) > 1:
  8. is_uniq = False
  9. if is_uniq:
  10. print("beautiful")
  11. else:
  12. print("ugly")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement