My issue
Answer
My code
# cook your dish here
def expression(opp,val):
if(val>opp+1 or val< -opp+1):
return "-1"
if val==1:
return "*"*opp
if val==0:
return "-"+"*"*(opp-1)
if val>1:
mul=val-1
return "+"*mul+"*"*(opp-mul)
return
if va<=-1:
mul=-val+-1
return "-"*mul+"*"*(opp-mul)
t=int(input())
for _ in range(t):
operations,val=map(int,input().split())
print(expression(operations,val))
Learning course: Design and Analysis of Algorithms
Problem Link: https://www.codechef.com/learn/course/kl-daa/KLDAA2400H/problems/EVALMAS