Computer Science, asked by nabarun100, 1 month ago

#include<bits/stdc++.h>
using namespace std;
int hsh[10]={6,2,5,5,4,5,6,3,7,6};
int main(){
int t;cin>>t;
while(t--){
int a,b;cin>>a>>b;
int sum=a+b;
int ans=0;
while(sum){
ans+=hsh[sum%10];
sum/=10;
}
cout<<ans<<endl;
}

}
//1<=t<=1000
//1<=a,b<=10^6 Why am I not getting Time limit exceeded problem here? The total time complexity should be 10^9 which is more than 10^7 .. why am i not getting TLE??​

Answers

Answered by avantika7488
1

What's this???? O_oO_oO_o

Similar questions