Sunday, October 27, 2013

Problem Link :
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3912
Solution : C

#include<stdio.h>
#include<stdlib.h>
int main()
{
   int a,b,c;
   while(scanf("%d%d",&a,&b)==2 && a>=0 &&b>=0)
   {
    c=abs(a-b);
    if(c>=50)
    c=100-c;
    printf("%d\n",c);
   }
   return 0;
}


0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home