-
Notifications
You must be signed in to change notification settings - Fork 437
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #623 from rk301999/master
atm machine and ascii pro
- Loading branch information
Showing
3 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) | ||
|