diff --git a/SOLUTIONS/asciipro.py b/SOLUTIONS/asciipro.py new file mode 100644 index 00000000..4b81c80d --- /dev/null +++ b/SOLUTIONS/asciipro.py @@ -0,0 +1,6 @@ +#code written by rk301999 +n=input() +pro=1 +for i in n: + pro*=ord(i) +print("given ascii of %s is = %d"%(n,pro)) diff --git a/SOLUTIONS/atm_machine.py b/SOLUTIONS/atm_machine.py new file mode 100644 index 00000000..2e875ed8 --- /dev/null +++ b/SOLUTIONS/atm_machine.py @@ -0,0 +1,14 @@ +n=int(input()) +for i in range(0,n): + k,n=map(int,input().split()) + l=list(map(int,input().split())) + l1=[] + for j in l: + p=n-j + if(p>=0): + l1.append("1") + n=p + else: + l1.append("0") + print("".join(l1)) + diff --git a/SOLUTIONS/binary_3.py b/SOLUTIONS/binary_3.py new file mode 100644 index 00000000..2e875ed8 --- /dev/null +++ b/SOLUTIONS/binary_3.py @@ -0,0 +1,14 @@ +n=int(input()) +for i in range(0,n): + k,n=map(int,input().split()) + l=list(map(int,input().split())) + l1=[] + for j in l: + p=n-j + if(p>=0): + l1.append("1") + n=p + else: + l1.append("0") + print("".join(l1)) +