From b6591d087f0b0889c328d96554e52d2b9479fd9c Mon Sep 17 00:00:00 2001
From: saketsuman07 <64769358+saketsuman07@users.noreply.github.com>
Date: Thu, 1 Oct 2020 11:26:07 +0530
Subject: [PATCH 1/2] Update Mini-Max_Sum.py
---
HackerRank-Mini-Max Sum/Mini-Max_Sum.py | 21 ++++++---------------
1 file changed, 6 insertions(+), 15 deletions(-)
diff --git a/HackerRank-Mini-Max Sum/Mini-Max_Sum.py b/HackerRank-Mini-Max Sum/Mini-Max_Sum.py
index b4ea822..0ccdffc 100644
--- a/HackerRank-Mini-Max Sum/Mini-Max_Sum.py
+++ b/HackerRank-Mini-Max Sum/Mini-Max_Sum.py
@@ -1,19 +1,10 @@
-#!/bin/python3
+a=list(map(int,input().split()))
+b,c=max(a),min(a)
-import math
-import os
-import random
-import re
-import sys
-# Complete the miniMaxSum function below.
-def miniMaxSum(arr):
- sum=0
- for i in range(len(arr)):
- sum+=arr[i]
- print ( sum-max(arr), sum-min(arr))
+d=sum(a)
-if __name__ == '__main__':
- arr = list(map(int, input().rstrip().split()))
+e,f=d-b ,d-c
+print(e,end=' ')
- miniMaxSum(arr)
+print(f)
From 2cea20ee83a30d9ad6b7c9f54792323283451500 Mon Sep 17 00:00:00 2001
From: saketsuman07 <64769358+saketsuman07@users.noreply.github.com>
Date: Thu, 1 Oct 2020 11:30:39 +0530
Subject: [PATCH 2/2] Update Compare_the_Triplets.py
---
.../Compare_the_Triplets.py | 44 +++++--------------
1 file changed, 12 insertions(+), 32 deletions(-)
diff --git a/HackerRank-Compare the Triplets/Compare_the_Triplets.py b/HackerRank-Compare the Triplets/Compare_the_Triplets.py
index 223a2d3..bcd39e5 100644
--- a/HackerRank-Compare the Triplets/Compare_the_Triplets.py
+++ b/HackerRank-Compare the Triplets/Compare_the_Triplets.py
@@ -1,32 +1,12 @@
-#!/bin/python3
-
-import math
-import os
-import random
-import re
-import sys
-
-# Complete the compareTriplets function below.
-def compareTriplets(a, b):
- alice=0
- bob=0
- for i in range(3):
- if(a[i]>b[i]):
- alice+=1
- elif(a[i]b[i]:
+ alice=alice+1
+ elif a[i]
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: