Skip to content

Commit

Permalink
Merge pull request #623 from rk301999/master
Browse files Browse the repository at this point in the history
atm machine and ascii pro
  • Loading branch information
TANIYA GUPTA authored Oct 27, 2018
2 parents da58709 + 2aeca4c commit 38f1efd
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
6 changes: 6 additions & 0 deletions SOLUTIONS/asciipro.py
Original file line number Diff line number Diff line change
@@ -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))
14 changes: 14 additions & 0 deletions SOLUTIONS/atm_machine.py
Original file line number Diff line number Diff line change
@@ -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))

14 changes: 14 additions & 0 deletions SOLUTIONS/binary_3.py
Original file line number Diff line number Diff line change
@@ -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))

0 comments on commit 38f1efd

Please sign in to comment.