URI Online Judge Solution| 1168 LED

Reference:
https://meavdluna.wordpress.com/2015/09/07/solucao-uri-1168-leds-c/

https://raw.githubusercontent.com/gmendonca/uri-problem-solutions/master/1168.cpp

https://github.com/deniscostadsc/playground/blob/master/uri/1168/1168.cpp



  • Hasib

    if(x[j] == ‘1’)
    {
    sum+=2;
    }
    else if(x[j] == ‘2’)
    {
    sum+=5;
    }
    else if(x[j] == ‘3’)
    {
    sum+=5;
    }
    else if(x[j] == ‘4’)
    {
    sum+=4;
    }
    else if(x[j] == ‘5’)
    {
    sum+=5;
    }
    else if(x[j] == ‘6’)
    {
    sum+=6;
    }
    else if(x[j]== ‘7’)
    {
    sum+=3;
    }
    else if(x[j] == ‘8’)
    {
    sum+=7;
    }
    else if(x[j] == ‘9’)
    {
    sum+=6;
    }
    else if(x[j] == ‘0’)
    {
    sum+=6;
    }
    can anyone explain this?