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 971 (Div. 4) 2009C. The Legend of Freya the Frog Solution

  Problem Link    https://codeforces.com/contest/2009/problem/C S olution in C++: /// Author : AH_Tonmoy #include < bits / stdc ++. h &g...

Powered by Blogger.