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)