Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n;
- cin>>n;
- int a,b,c,d;
- d=n%10;
- c=(n/10)%10;
- b=(n/100)%10;
- a=(n/1000)%10;
- int k[10];
- k[0]=6;
- k[1]=3;
- k[2]=5;
- k[3]=5;
- k[4]=4;
- k[5]=5;
- k[6]=5;
- k[7]=3;
- k[8]=7;
- k[9]=5;
- cout<<k[d]+k[c]+k[b]+k[a];
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement