Please help me rearrange this code again and please correct it. I can't run it. Thank you!
n = int(input())
for i in range(n):
1st = list(map(int,input().split()))
lst1 = lst[1:]
elem = lst1[0]
counter = 1
for j in range (1,len(lst1)):
if 2*elem > lst1[j]:
counter = 0
break
elem = lst1[j]
if counter == 1:
print("Denominations: " lst1)
print("Good coin denominations !")
else:
print("Denominations: " lst1)
print("Bad coin denominations !")
n = int(input())
for i in range(n):
lst = list(map(int,input().split()))
lst1 = lst[1:]
elem = lst1[0]
counter= 1
for j in range (1,len(lst1)):
if 2*elem > lst1[j]:
counter = 0
break
elem = lst1[j]
if(counter == 1):
print("Denominations: ",lst1)
print("Good coin denominations !")
else:
print("Denominations: ",lst1)
print("Bad coin denominations !")
Comments
Leave a comment