From d8f2367b13bfe46b664dd3c60ff1d8117b936e4a Mon Sep 17 00:00:00 2001 From: vidyadeepa <44111486+vidyadeepa@users.noreply.github.com> Date: Sat, 13 Oct 2018 15:28:46 +0530 Subject: [PATCH 1/2] Add files via upload --- CodeChef Answers/vidya.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 CodeChef Answers/vidya.py diff --git a/CodeChef Answers/vidya.py b/CodeChef Answers/vidya.py new file mode 100644 index 0000000..fb4739f --- /dev/null +++ b/CodeChef Answers/vidya.py @@ -0,0 +1,8 @@ +t = int(input("enter no of inputs: ")) +l=[] +for i in range(t): + a=input("number:") + l.append(a) +print l.count(4) + + From 3ef0fba6b4a45c2c13318379433967d09df20482 Mon Sep 17 00:00:00 2001 From: vidyadeepa <44111486+vidyadeepa@users.noreply.github.com> Date: Sat, 13 Oct 2018 16:17:00 +0530 Subject: [PATCH 2/2] Add files via upload --- abc.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 abc.py diff --git a/abc.py b/abc.py new file mode 100644 index 0000000..0f5c385 --- /dev/null +++ b/abc.py @@ -0,0 +1,21 @@ +max1,max2 = 0,0 +lead1,lead2 = 0,0 +s,t = 0,0 +n = int(input("no of inputs: ")) +for i in range(n): + p1=int(input("p1: ")) + p2=int(input("p2: ")) + s += p1 + t += p2 + if s>t: + lead1 = s-t + else: + lead2 = t-s + if lead1 > max1: + max1 = lead1 + elif lead2 > max2: + max2 = lead2 +if (max1>max2): + print(1,max1) +else: + print(2,max2)