Skip to content

Commit 472b103

Browse files
committed
add beginners questions
1 parent dcdd4c5 commit 472b103

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed

CodeChef/begineer/BLACKJACK.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Problem Code:BLACKJACK
2+
# Problem Name:Blackjack
3+
# Problem Link:https://www.codechef.com/submit/BLACKJACK
4+
5+
6+
for _ in range(int(input())):
7+
a,b = map(int,input().split())
8+
9+
if((21-(a+b))>10):
10+
print('-1')
11+
else:
12+
print(21-(a+b))

CodeChef/begineer/DNASTRAND.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Problem Code:DNASTRAND
2+
# Problem Name:Complementary Strand in a DNA
3+
# Problem Link:https://www.codechef.com/submit/DNASTRAND
4+
5+
for _ in range(int(input())):
6+
n=int(input())
7+
s=list(input()[:n])
8+
e=''
9+
d={'A':'T','T':'A','C':'G','G':'C'}
10+
for i in s:
11+
e=e+d[i]
12+
print(e)

CodeChef/begineer/JENGA.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Problem Code:JENGA
2+
# Problem Name:Jenga Night
3+
# Problem Link:https://www.codechef.com/submit/JENGA
4+
5+
6+
for _ in range(int(input())):
7+
n,x=map(int,input().split())
8+
if(n==x):
9+
print("yes")
10+
elif(x%n==0):
11+
print("yes")
12+
else:
13+
print("no")

0 commit comments

Comments
 (0)