From 13f4b8278fc724965068b7c4fe339c5b8770c51b Mon Sep 17 00:00:00 2001 From: gramanas Date: Wed, 21 Oct 2020 17:55:31 +0300 Subject: Small fixes --- 1.py | 2 ++ 2.1.py | 11 +++++++++-- 2.2.py | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/1.py b/1.py index 85fe7d8..29db5c6 100644 --- a/1.py +++ b/1.py @@ -1,3 +1,5 @@ # given: two lists containing the same integers # but one list contains an extra one # find it and return it + +print("Do I really need to type this again?") diff --git a/2.1.py b/2.1.py index 43896d6..63e4a99 100644 --- a/2.1.py +++ b/2.1.py @@ -1,4 +1,4 @@ -#!/usr/bin/pytnon2 +#!/usr/bin/python2 ## You are given a list of "pegs" with their location (positive integers, asc order). ## these pegs can accept gears with radius > 1 @@ -9,7 +9,7 @@ from fractions import gcd from functools import reduce -# test +# for tests from random import seed from random import random @@ -45,6 +45,13 @@ def solution(pegs): return [-1, -1] return [r1, 1] + + +# test cases provided +print(solution([4,30,50])) # [12, 1] +print(solution([4,17,50])) # [-1, -1] + +# tests seed(1) def ran(): diff --git a/2.2.py b/2.2.py index 08a46c7..badb9a0 100644 --- a/2.2.py +++ b/2.2.py @@ -62,5 +62,6 @@ def solution(h, q): return p +# test cases provided print(solution(5, [19, 14, 28])) # 21,15,29 print(solution(3, [7, 3, 5, 1])) # -1,7,6,3 -- cgit v1.2.3