Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions 33271144.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@



14 changes: 14 additions & 0 deletions Ada King- July20B.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
for _ in range(int(input())):
temp = ["O"]
for __ in range(int(input())):
temp.append(".")
temp+= ["X"]*(64-len(temp))
chess,k =[], 0
for i in range(8):
temp2=[]
for j in range(8):
temp2.append(temp[k])
k+=1
chess.append(temp2)
print('\n'.join([''.join([item for item in row])
for row in chess]),"\n")
9 changes: 9 additions & 0 deletions Another_Card(Aug20B).py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import math
for _ in range(int(input())):
Pc,Pr = map(int, input().split())
Pr = math.ceil(Pr/9)
Pc = math.ceil(Pc/9)
if Pr <= Pc:
print(1,Pr)
else:
print(0,Pc)
11 changes: 11 additions & 0 deletions Carvans.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

for _ in range(int(input())):
x=int(input())
y=list(map(int,input().split()))
max=0
for i in range(x-1):
if y[i+1]>y[i]:
y[i+1]=y[i]
else:
max+=1
print(max)
25 changes: 25 additions & 0 deletions Chef and Cards- July20B.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
def count(i):
c = 0
for __ in range(len(i)):
c+=int(i[__])
return c


for _ in range(int(input())):
chef= 0
morty= 0
for k in range(int(input())):
a,b = input().split()
if count(a)>count(b):
chef+=1
elif count(a)<count(b):
morty+=1
else:
chef += 1
morty += 1
if chef > morty:
print(0, chef)
elif chef < morty:
print(1, morty)
else:
print(2, chef)
7 changes: 7 additions & 0 deletions Chef and Strings- July20B.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
for _ in range(int(input())):
n=int(input())
lis= list(map(int,input().split()))
skip_strings=0
for i in range(n-1):
skip_strings+= lis[i+1] -lis[i] -1
print(skip_strings)
4 changes: 4 additions & 0 deletions Life,The Universe And Everything.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
i=int(input())
while i!=42:
print(i)
i=int(input())
12 changes: 12 additions & 0 deletions lapindrome.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
z=int(input())
for i in range(z):
s=input()
s1=s[:len(s)//2]
s2=s[(len(s)+1)//2:]
try:
for i in s1:
t=s2.index(i)
s2=s2[:t]+s2[t+1:]
print("YES")
except ValueError:
print("NO")