Coodechef Ciel and A-B Problem Problem Code: CIELAB Solution

Solution in C++:
///**********ALLAH IS ALMIGHTY************///
///AH Tonmoy
///Department of CSE,23rd batch
///Islamic University,Bangladesh
#include<iostream>
using namespace std;
int main()
{

    int a,b,d,c,v,v1,f,r;
    while(cin>>a>>b)
    {
        d=a-b;
        c=d%10;
        v=d/10;
        if(c==9)
            c=8;
        else
            c=c+1;

        r=v*10+c;
        cout<<r<<endl;
    }

}

No comments

Most View Post

Recent post

RESTful APIs with CRUD Operations in Laravel 12| (2025)

  RESTful APIs serve as the foundation of modern web development. They follow a set of rules called Representational State Transfer (REST) t...

Powered by Blogger.