/* UVa 12468 - Zapping */
#include <stdio.h>
int main() {
int a, b;
while (scanf("%d%d", &a, &b) && (a != -1) && (b != -1)) {
int s1 = (a - b + 100) % 100;
int s2 = (b - a + 100) % 100;
if (s1 < s2)
printf("%d\n", s1);
else
printf("%d\n", s2);
}
return 0;
}
No comments:
Post a Comment