1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
#include <iostream> #include <cstdio> #include <cstdio> #include <cstring> #include <vector> #include <cmath> #include <cstdlib> #define INF 1000000 #define ll long long using namespace std; int main() { int m,n,diff1,diff2; while(scanf("%d%d",&m,&n) && m!=-1 && n!=-1) { if(m==-1 && n==-1) break; diff1 = abs(m-n); if(diff1<=50) printf("%d\n",diff1); else printf("%d\n",100-diff1); } return 0; } |