From 30df1d2f63a75a3252711d6cd5719229d26341c7 Mon Sep 17 00:00:00 2001 From: "Adithya.R.K" <103249582+Adi-xx@users.noreply.github.com> Date: Sun, 29 May 2022 16:29:09 +0530 Subject: [PATCH] Solution 2 --- solution2 | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/solution2 b/solution2 index 706e0cd..ddd470f 100644 --- a/solution2 +++ b/solution2 @@ -1 +1,36 @@ Code for Question 2 +n=int(input()) +for x in range(n): + print("INPUT") + a=input() + + print("OUTPUT") + + l=a.split() + n=str(int(l[0])*int(l[-1])+int(l[1])*int(l[-1])+int(l[2])) + + l1=list(n) + c=0 + for x in l1: + if x=='0': + c=c+6 + if x=='1': + c=c+2 + if x=='2': + c=c+5 + if x=='3': + c=c+5 + if x=='4': + c=c+4 + if x=='5': + c=c+5 + if x=='6': + c=c+6 + if x=='7': + c=c+3 + if x=='8': + c=c+7 + if x=='9': + c=c+6 + + print(c)