Solution - UVa Problem 11547 - Automatic Answer


সল্যুশন্সঃ
#include<iostream>
using namespace std;

int main()
{
    int tstCase;
    cin >> tstCase;
    for(int i=1; i<=tstCase; i++)
    {
        int nmbr, nNmbr;
        cin >> nmbr;
        nNmbr = ((((((nmbr*567)/9)+7492)*235)/47)-498);
        nNmbr = (nNmbr/10)%10;
        if(nNmbr<0)
            nNmbr = -nNmbr;

        cout << nNmbr << endl;
    }
    return 0;
}

আলোচনাঃ
প্রবেলম টি এক বার পড়ে আমি বুঝি নাই, What is the digit in the tens column? এর পর ক্যালকুলেশন করে টোটাল নাম্বার বের করলাম ক্যালকুলেটর এ। দেখলাম দশকের ঘরের নাম্বার টা Answer এর সাথে মিলে যাচ্ছে। ইয়াহ হু..................... 

Comments

Popular posts from this blog

Solution - Codeforces Problem 327B - Hungry Sequence

What is Data Mining? ডাটা মাইনিং কি?

Solution - Timus Problem 1293. Eniya