Sunday, April 24, 2016

UVA 12468 - Zapping : Solution

Unknown
# include <stdio.h>
# include <math.h>
int main()
{
    int t=200,a,b;
    while (t--)
    {
        scanf("%d%d",&a,&b);
        if (a==-1 && b==-1) break;
        a=abs(a-b);
        if (a>50) a=100-a;
        printf("%d\n",a);
    }
    return 0;
}

Unknown

Studying at Shahjalal University of Science and Technology, Sylhet.

0 comments:

Post a Comment

Coprights @ 2016,