From e27189cc0f209c4b8e113e142729eba0f3388820 Mon Sep 17 00:00:00 2001 From: 4ist Date: Fri, 2 Oct 2020 15:00:19 -0400 Subject: [PATCH 1/2] added hackerrank sources to solutions --- captains room.py | 3 +++ kangaroo.py | 4 ++++ mutations.py | 4 ++++ noidea.py | 4 ++++ setmutation.py | 4 ++++ 5 files changed, 19 insertions(+) diff --git a/captains room.py b/captains room.py index 25e9d6d..8d96752 100644 --- a/captains room.py +++ b/captains room.py @@ -1,3 +1,6 @@ +''' +Source: https://www.hackerrank.com/challenges/py-the-captains-room/problem +''' K = int(input()) room_numbers = map(int, input().split()) rooms = set(room_numbers) diff --git a/kangaroo.py b/kangaroo.py index b89d2b5..454681d 100644 --- a/kangaroo.py +++ b/kangaroo.py @@ -1,3 +1,7 @@ +''' +Source: https://www.hackerrank.com/challenges/kangaroo/problem +''' + x1,v1,x2,v2 = raw_input().strip().split(' ') x1,v1,x2,v2 = [int(x1),int(v1),int(x2),int(v2)] diff --git a/mutations.py b/mutations.py index 44a672d..fd880e5 100644 --- a/mutations.py +++ b/mutations.py @@ -1,3 +1,7 @@ +''' +Source: https://www.hackerrank.com/challenges/python-mutations/problem +''' + n=input() m=input().split() l=list(n) diff --git a/noidea.py b/noidea.py index 0df1db6..bbf30fa 100644 --- a/noidea.py +++ b/noidea.py @@ -1,3 +1,7 @@ +''' +Source: https://www.hackerrank.com/challenges/no-idea/problem +''' + n=input() count=0 a=set(input()) diff --git a/setmutation.py b/setmutation.py index e26c0ce..285e135 100644 --- a/setmutation.py +++ b/setmutation.py @@ -1,3 +1,7 @@ +''' +Source: https://www.hackerrank.com/challenges/py-set-mutations/problem +''' + n = int(input()) count=0 s = set(map(int, input().split())) From 77d9969a8346ac74328ab141de0c10ce6661e155 Mon Sep 17 00:00:00 2001 From: 4ist Date: Fri, 2 Oct 2020 15:02:44 -0400 Subject: [PATCH 2/2] added forgotten whitespace --- captains room.py | 1 + 1 file changed, 1 insertion(+) diff --git a/captains room.py b/captains room.py index 8d96752..01f3af7 100644 --- a/captains room.py +++ b/captains room.py @@ -1,6 +1,7 @@ ''' Source: https://www.hackerrank.com/challenges/py-the-captains-room/problem ''' + K = int(input()) room_numbers = map(int, input().split()) rooms = set(room_numbers)