Total Prize Money | Problem - 3 | Beginner level | C language | CodeChef

Link to the problem statement: https://www.codechef.com/submit-v2/PRIZEPOOL

Solution: 

#include <stdio.h>

int main(void) {
int i, a, x, y, t;
scanf("%d", &t);
if(t>=1 && t<=1000)
{
    for(i=0;i<t;i++)
    {
        scanf("%d %d", &x, &y);
        if( y>=1 && x>=y && x<=1000 )
        {
            a = ( 10 * x ) + ( 90 * y );
            printf("%d\n", a);
        }
    }
}
return 0;
}


You can watch the video solution of this problem:




Hope this will help you, if you want anything else leave a comment.

Thank you

Comments

Popular posts from this blog

My very 1st contest! | Problem - 1 | Beginner level | C language | CodeChef

Implementing linked list in C language

Score High | Problem - 4 | Beginner level | C language | CodeChef