Advertisement
Josif_tepe

Untitled

Feb 9th, 2021
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int n;
  8.     cin>>n;
  9.     int a,b,c,d;
  10.     d=n%10;
  11.     c=(n/10)%10;
  12.     b=(n/100)%10;
  13.     a=(n/1000)%10;
  14.     int k[10];
  15.     k[0]=6;
  16.     k[1]=3;
  17.     k[2]=5;
  18.     k[3]=5;
  19.     k[4]=4;
  20.     k[5]=5;
  21.     k[6]=5;
  22.     k[7]=3;
  23.     k[8]=7;
  24.     k[9]=5;
  25.     cout<<k[d]+k[c]+k[b]+k[a];
  26.     return 0;
  27. }
  28.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement