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
t=int(input()) | |
for i in range(t): | |
n,k=map(int,input().split()) | |
arr=list(map(int,input().split())) | |
res=sorted(arr) | |
largest_divisor=0 | |
for i in res: | |
# 3 | |
if k % i == 0: |
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
import math | |
t=int(input()) | |
for i in range(t): | |
x,y=map(int,input().split()) | |
chef=round(math.ceil(x/9)) | |
raick=round(math.ceil(y/9)) | |
if raick<chef: | |
print(1,"",raick) | |
elif raick==chef: |
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
class Node: | |
def __init__(self,data): | |
self.data=data | |
self.next=None | |
def LinkedList(arr): | |
head=None | |
tail=None | |
if len(arr)<1: | |
return None |
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
class Node: | |
def __init__(self,data): | |
self.data=data | |
self.next=None | |
def LinkedList(arr): | |
head=None | |
tail=None | |
if len(arr)<1: | |
return |
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
class Node: | |
def __init__(self,data): | |
self.data=data | |
self.next=None | |
def LinkedList(arr): | |
head=None | |
tail=None | |
if len(arr)<1: | |
return | |
else: |
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
t=int(input()) | |
for i in range(t): | |
h,p=map(int,input().split()) | |
while h>0: | |
h = h - p | |
p = p // 2 | |
if p>h: | |
print(1) | |
break | |
elif p==0 and h!=0: |
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
n=int(input()) | |
n0=int(input()) | |
s0 = input() | |
a0=s0.count("G") | |
b0=s0.count("C") | |
arr=[] | |
for i in range(n): | |
n1=int(input()) | |
s1=input() | |
a1=s1.count("G") |
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
class Node: | |
def __init__(self, data): | |
self.data = data | |
self.next = None | |
def LinkedLists(arr): | |
head = None | |
tail = None | |
if len(arr) < 1: |
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
class Node: | |
def __init__(self,data): | |
self.data=data | |
self.next=None | |
def LinkedList(arr): | |
head=None | |
tail=None | |
if len(arr)<1: | |
return |
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
class Node: | |
def __init__(self, data): | |
self.data = data | |
self.next = None | |
def LinkedLists(arr): | |
head = None | |
tail = None | |
if len(arr) < 1: |