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) + + 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)