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

Codeforces Round 925 (Div. 3) 1931D. Divisible Pairs Solution

    Problem Link  :   https://codeforces.com/contest/1931/problem/D S olution in C++: /// Author : AH_Tonmoy #include < bits / stdc ++. ...

Powered by Blogger.