Skip to content

Commit

Permalink
Create betweenTwoSets.py
Browse files Browse the repository at this point in the history
  • Loading branch information
GJAnsah authored Jan 29, 2020
1 parent ebf851c commit 6268020
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions betweenTwoSets.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
https://www.hackerrank.com/challenges/between-two-sets/problem

#!/bin/python3

import math
import os
import random
import re
import sys


first_multiple_input = input().rstrip().split()

n = int(first_multiple_input[0])

m = int(first_multiple_input[1])

a = list(map(int, input().rstrip().split()))

b = list(map(int, input().rstrip().split()))

r=[]
for i in range (1,101):
if all(i%x==0 for x in a):
if all(y%i==0 for y in b):
r.append(i)
print(len(r))

0 comments on commit 6268020

Please sign in to comment.